Foros del Web » Creando para Internet » HTML »

un enlace para saltar a otra parte de la web

Estas en el tema de un enlace para saltar a otra parte de la web en el foro de HTML en Foros del Web. Hola tengo este codigo: <A href="#1">texto</a><br><br> <tr><!-- Row 3 --> <td>&nbsp;</td><!-- Col 1 --> <td>&nbsp;</td><!-- Col 2 --> </tr> y me da estos errores: Line ...
  #1 (permalink)  
Antiguo 18/01/2005, 16:51
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 4 meses
Puntos: 0
un enlace para saltar a otra parte de la web

Hola tengo este codigo:

<A href="#1">texto</a><br><br>


<tr><!-- Row 3 -->
<td>&nbsp;</td><!-- Col 1 -->
<td>&nbsp;</td><!-- Col 2 -->
</tr>




y me da estos errores:

Line 98, column 17: document type does not allow element "A" here; missing one of "TH", "TD" start-tag

<A name="1" <td class="tdtitulo">DISEÑO Y CREACIÓN DE PÁGINAS WEB</td><!

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").



¿Como podria corregir ese error?
  #2 (permalink)  
Antiguo 18/01/2005, 16:57
Avatar de PatomaS
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: En alguna otra parte
Mensajes: 4.656
Antigüedad: 20 años, 1 mes
Puntos: 63
Hola

Si te rfieres a este código:

Código:
<A href="#1">texto</a><br><br>
En principio está bien, aunaue si lo encierras entre <p> quedará mejor y te ahorras los dos >br>, así

Código:
<p><A href="#1">texto</a></p>
Pero si te refieres a:

Código:
<A name="1" <td class="tdtitulo">DISEÑO Y CREACIÓN DE PÁGINAS WEB</td><!
Está mal escrito, deberíaestar así

Código:
<td class="tdtitulo"><A name="1">DISEÑO Y CREACIÓN DE PÁGINAS WEB</a></td>
Como consejo general, te recomiendo que los «name» y los «id» no los inicies con números, en ocasiones dan problemas.

Felicidad
__________________
¡ hey, hou, hou, hey !
  #3 (permalink)  
Antiguo 18/01/2005, 17:12
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 4 meses
Puntos: 0
Hola ,hice todo lo ke me dijiste pero me da estos errores:


Below are the results of attempting to parse this document with an SGML parser.

Line 84, column 25: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

<br><A href="#uno"><p>Diseño y creación de páginas Web.</p></a>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").



Line 95, column 76: end tag for "A" omitted, but its declaration does not permit this

...uno">DISEÑO Y CREACIÓN DE PÁGINAS WEB</td><!-- Col 2 -->



Line 95, column 26: start tag was here

<td class="tdtitulo"><A name="uno">DISEÑO Y CREACIÓN DE PÁGINAS WEB</td>
  #4 (permalink)  
Antiguo 18/01/2005, 18:47
Avatar de KnowDemon  
Fecha de Ingreso: julio-2004
Ubicación: Ciudad de México
Mensajes: 544
Antigüedad: 19 años, 9 meses
Puntos: 2
Hola,

El elemento a no puede contener elementos en bloque. Por tanto no puedes colocar un párrafo o una celda dentro de un enlace. Pon el enlace dentro del párrafo o la celda como decía PantomaS.

El atributo href debe contener un URI válido... Algo como #1 no cumple el estándar estricto. Tampoco lo cumplen etiquetas y atributos en mayúscula.

No se que deseas conseguir con algo como href="#1".

Faltan partes de tu código que no están en tu mensaje que dan problemas a juzgar por los mensajes de error.
__________________
Mi pequeño espacio en la web: VisiónE
"El cosmos es todo lo que es, todo lo que fue, y todo lo que será alguna vez."

Última edición por KnowDemon; 18/01/2005 a las 18:51
  #5 (permalink)  
Antiguo 19/01/2005, 04:25
Avatar de PatomaS
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: En alguna otra parte
Mensajes: 4.656
Antigüedad: 20 años, 1 mes
Puntos: 63
Hola

Los errores no tiene porque está en las líneas exactas que ahí dice, ¿por qué no pones la dirección de tu página o el código completo para que lo veamos?.

Además, no hiciste exactamente lo que puse, yo puse los <p> rodeando los <a> y no al revés.

Luego en la última línea tienes un <a> sin cerrar.

Revisa loq ue te dice KnowDemon y trata de ponernos la dirección de la página.

Así línea por línea es más complicado y menos productivo.

Felicidad
__________________
¡ hey, hou, hou, hey !
  #6 (permalink)  
Antiguo 19/01/2005, 13:15
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 4 meses
Puntos: 0
Si tenias razon el error era por la ultima linea ,,lo cerre y va todo bien.

Gracias.
  #7 (permalink)  
Antiguo 19/01/2005, 16:19
Avatar de PatomaS
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: En alguna otra parte
Mensajes: 4.656
Antigüedad: 20 años, 1 mes
Puntos: 63
Perfecto entonces...

:)

Felicidad
__________________
¡ hey, hou, hou, hey !
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:49.