Foros del Web » Creando para Internet » HTML »

Solucion XHtml ? Alguna Solucion

Estas en el tema de Solucion XHtml ? Alguna Solucion en el foro de HTML en Foros del Web. Hola miren tengo un problema on mi validacion desde la W3C me dice el sigte error pero no se como solucionarlo: Validation Output: 2 Errors ...
  #1 (permalink)  
Antiguo 20/05/2008, 11:26
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Pregunta Solucion XHtml ? Alguna Solucion

Hola miren tengo un problema on mi validacion desde la W3C me dice el sigte error pero no se como solucionarlo:

Validation Output: 2 Errors
Código:
<center> 
Ahi es donde me marca en rojo donde me da el error con el mensaje:
Cita:

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:

* incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
/*--------------------------------------------------*/
Y este el el siguiente error

Código:
  <a href="http://tienda.com" target="_blank">Tienda Online</a></li>
Ahi es donde me marca en rojo, donde dice que elta el error con el sgte mensaje:
Cita:

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Cual seria realmente el error no veo.
El <center> esta al comienzo mismo antes no me generaba ese error solo ahora
alguna ayudita?
  #2 (permalink)  
Antiguo 20/05/2008, 12:02
 
Fecha de Ingreso: diciembre-2005
Mensajes: 97
Antigüedad: 18 años, 4 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

para el segundo error, creo que no te valida porque el atributo target no es valido en xhtml; prueba borrando el ese atributo,
__________________
_Derek_
  #3 (permalink)  
Antiguo 20/05/2008, 13:01
 
Fecha de Ingreso: enero-2006
Ubicación: mi casa
Mensajes: 255
Antigüedad: 18 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

Esto pasa por que al parecer estás usando en tu DOCTYPE el tipo Strict...
y las reglas del xHTML
no permiten en el uso de la tag "center", desde xHTML se ha eliminado esto y ahora el formateo del texto pasa a ser uso de CSS (con text-align:center)

El segundo error me imagino es por que el xHTML Strict no permite el atributo target...


simplemente cambia de Strict a Transitional.

Un saludo

PD: y no uses < center >!
  #4 (permalink)  
Antiguo 20/05/2008, 13:19
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

pavelinhos y NightDark

Gracias por sus respuestas , voy a intentar de otra manera,. estaba pensado y si no puedo usar el target entonces deberia hacerlo con window.open() no hay otra haber si tambien eso me permite.
El center lo use ya que centra todo el contenido de un <div> central que engloba todo el contenido

Les agradezco luego les cuento el resultado.
  #5 (permalink)  
Antiguo 20/05/2008, 13:32
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

una consulta como usaria el target de otra manera? que no sea con window open? pero no le entiendo ellos me dan un enlace por ejemplo:

<a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.xxxxdominio.com/" target="_blank">

ellos dan de esta manera con el target blank y no permite no entiendo..
  #6 (permalink)  
Antiguo 20/05/2008, 13:32
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

aparte si lo hago desde javascript los buscadores no tomaran el enlace de referencia o del link
  #7 (permalink)  
Antiguo 20/05/2008, 13:35
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

no es lo mismo

Código:
<a href="http://www.forosdelweb.com/">Link</a>
que esto:

Código:
<a href="javascript:window.open('http://www.forosdelweb.com')" >Link</a>

me parece que los buscadores no toman referencia del LINK si lo hacemos por JS
o me equivoco?
  #8 (permalink)  
Antiguo 20/05/2008, 13:43
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

Bien quite el <center> e inserte un div con lo siguiente

<div align="center">

pero igual me da error

<div align="center">
Cita:

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

algo esta mal de vuelta
  #9 (permalink)  
Antiguo 20/05/2008, 14:08
 
Fecha de Ingreso: diciembre-2005
Mensajes: 97
Antigüedad: 18 años, 4 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

Si lo que quieres se centar un div, puedes utilizar este codigo(puedes modificar el ancho y alto con los valores width y height):
Cita:
<div style="width:800px; height:600px; margin: 10px auto"> contenido..........
</div>
__________________
_Derek_
  #10 (permalink)  
Antiguo 20/05/2008, 14:55
Avatar de [NiRVaNa]  
Fecha de Ingreso: abril-2004
Ubicación: Someplace In The Middle Of Nowhere!
Mensajes: 325
Antigüedad: 20 años
Puntos: 6
Respuesta: Solucion XHtml ? Alguna Solucion

o tambien...

Código HTML:
<div style="text-align: center;">Coontenido</div> 
Con respecto a tu segundo error... Fijate en el DOCTYPE, se ubica por encima de la etiqueta de inicio de HTML.

Seguramente tendrás algo asi (Strict):
Código HTML:
<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en"
    "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> 
Intenta cambiando por esta (Transitional):
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
y vuelve a validar, si de esa manera sigue marcandote error el target, tendrás que quitarlo y usar alguna otra forma de abrir una pagina nueva. O usar el doctype de HTML 4 que si lo soporta...

Última edición por [NiRVaNa]; 20/05/2008 a las 15:01
  #11 (permalink)  
Antiguo 21/05/2008, 07:49
 
Fecha de Ingreso: febrero-2005
Ubicación: 101% Paraguayo
Mensajes: 57
Antigüedad: 19 años, 2 meses
Puntos: 0
Respuesta: Solucion XHtml ? Alguna Solucion

[NiRVaNa] muchas gracias me sirvio deluxe tu info.. hasta lo solucione. :D gracias gracias
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 16:13.