Foros del Web » Creando para Internet » Diseño web »

validar html y css de w3c

Estas en el tema de validar html y css de w3c en el foro de Diseño web en Foros del Web. como ago para validar,saber si la pagina que estoy haciendo entra dentro de los estandares del w3c?????...
  #1 (permalink)  
Antiguo 04/02/2010, 17:48
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
validar html y css de w3c

como ago para validar,saber si la pagina que estoy haciendo entra dentro de los estandares del w3c?????
  #2 (permalink)  
Antiguo 04/02/2010, 17:57
Avatar de Daniel Ulczyk
Super Moderador
 
Fecha de Ingreso: febrero-2005
Ubicación: Buenos Aires
Mensajes: 9.263
Antigüedad: 19 años, 1 mes
Puntos: 2114
Respuesta: validar html y css de w3c

Markup Validation Service - HTML, XHTML
CSS Validation Service

__________________
—Somos lo que hacemos repetidamente. La excelencia, entonces, no es un acto sino un hábito. (Aristóteles dixit)
  #3 (permalink)  
Antiguo 04/02/2010, 18:21
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

gracias..ya lo e mirado y me salen varios errores pero todo esta en ingles (mierdaaaa): pongo algunos de ellos para que me ayudeis a entender que errores he cometido:

# Error Line 41, Column 23: document type does not allow element "style" here

<style type="text/css">


The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


2º error:

# Error Line 53, Column 84: required attribute "alt" not specified

…00px.jpg" width="800" height="200" /></div>



The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.


3º error:


# Error Line 59, Column 9: Attribute "href" exists, but can not be used for this element.

<A href="index.html" onmouseout="cambia('primera',inicio);" onmouseover="cambia(



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.
  #4 (permalink)  
Antiguo 04/02/2010, 19:31
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

¿Cuál es la página? El primer error indica que estás colocando la etiqueta <style> en un contexto no válido (¿en el body?), el segundo error indica que no el tag <img /> debe tener obligatoriamente el atribut alt pero tú no lo estás especificando.

Escribe todos los tags en minúsculas.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #5 (permalink)  
Antiguo 05/02/2010, 06:42
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

david la pagina es esta www.tanato.site11.com

haber si me podeis explicar los errores o algunos de ellos por ke yo no me entero...
  #6 (permalink)  
Antiguo 05/02/2010, 07:10
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

Ya te expliqué algunos.

Para escribir HTML válido, necesariamente tienes que leer la especificación:
http://www.sidar.org/recur/desdi/tra...ml/xhtml11.htm
http://html.conclase.net/w3c/html401-es/cover.html

En cuanto a los errores en el validador, un traductor te puede ayudar a darte una idea del problema.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #7 (permalink)  
Antiguo 17/02/2010, 11:00
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

david gracias por el link sobre la especificacion html 4...ya me lo estoy leyendo.

estoy usando el validador de html y ya e corregido algunos errores pero tengo este que no entiendo por que el codigo html creo que esta bien escrito pero me dice esto:

# Error end tag for X omitted, but OMITTAG NO was specified



You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

* Line 77, column 5: end tag for "li" omitted, but OMITTAG NO was specified

</ul>

no entiendo lo de omittag no fue especificado!!!!!!
  #8 (permalink)  
Antiguo 17/02/2010, 11:13
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

otro error:
document type does not allow element X here; missing one of Y start-tag



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 66, column 4: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

<li>

* Line 71, column 4: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

<li>

y aqui el mismo error traducido con google al castellano:

El elemento mencionado no se le permite aparecer en el contexto en el que usted ha colocado, los demás elementos mencionados son los únicos que están autorizados y no puede contener el elemento mencionado. Esto podría significar que se necesita un elemento que contiene, o tal vez que te has olvidado de cerrar un elemento anterior.

Una posible causa de este mensaje es que usted ha intentado poner un elemento en bloque (como "<p>" o "<table>") dentro de un elemento en línea (como "<a>", "<span> ", o" <font> ").

* Línea 66, columna 4: tipo de documento no permite li elemento "" aquí, que falta uno de los "UL", "ol", "menú", "dir" start-tag

<li>

* Línea 71, columna 4: tipo de documento no permite li elemento "" aquí, que falta uno de los "UL", "ol", "menú", "dir" start-tag

<li>

pero no entiendo que es lo que he hecho mal en mi pagina (sobre este error)
  #9 (permalink)  
Antiguo 17/02/2010, 11:15
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

El problema es que tienes un <a></a> en medio de la lista, lo cual no está permitido, tienes algo así:
Código HTML:
Ver original
  1. <ul>
  2.     <li>...</li>
  3.     <a>...</a>
  4.     <li>...</li>
  5. </ul>
Debería ser:
Código HTML:
Ver original
  1. <ul>
  2.     <li>...</li>
  3.     <li><a>...</a></li>
  4.     <li>...</li>
  5. </ul>
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #10 (permalink)  
Antiguo 17/02/2010, 11:25
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

gracias david...ahora me acabo de dar cuenta de que era eso tenia un <a> </a> sin estar dentro de un <li>.. en el menu principal pufffff
  #11 (permalink)  
Antiguo 17/02/2010, 11:30
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

de 30 y pico errores que tenia en el index ya solo me quedan dos pongo el error:

document type does not allow element X here



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

* Line 90, column 78: document type does not allow element "script" here

…p://analytics.hosting24.com/count.php"></script>

* Line 91, column 10: document type does not allow element "noscript" here

<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting

Y la traduccion al español:


El elemento mencionado anteriormente se encontró en un contexto donde no está permitido. Esto podría significar que usted tiene mal anidado elementos - como el estilo de un "elemento" en el "cuerpo" en lugar de dentro "de cabeza" - o dos elementos que se superponen (que no se permite).

Una causa común de este error es el uso de la sintaxis XHTML en los documentos HTML. Debido a las normas de HTML de los elementos implícitamente cerrado, este error puede crear efectos en cascada. Por ejemplo, "XHTML utilizando el auto-cierre" de etiquetas "meta" y "link" en la "cabeza" de un documento HTML puede provocar que el analizador de inferir el final de la "cabeza" y del principio del "cuerpo sección "(donde" enlace "y" meta "no se les permite, de ahí el error de publicación).

* Línea 90, columna 78: tipo de documento no permite el "elemento de script" aquí

... P: / / "analytics.hosting24.com/count.php> </ script>

* Línea 91, columna 10: tipo de documento no permite el "elemento" noscript "aquí

<noscript> <a href="http://www.hosting24.com/"> <img src = "http://analytics.hosting.

este tampoco lo entiendo....
  #12 (permalink)  
Antiguo 17/02/2010, 11:34
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

El mensaje es claro, haz colocado la etiqueta <script> en un contexto donde no está permitido. Lo estás colocando fuera del bloque <html></html> (aunque, de hecho, es código colocado por tu proveedor de hosting, así que tendrías que hablar con ellos)
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #13 (permalink)  
Antiguo 17/02/2010, 11:38
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

ok gracias tio....el hosting es grauito es el 000webhost........pues como la pagina cuando este terminada (se la estoy haciendo a un colega) será subida a un server de pago no creo que en este de pago me pongan codigos fuerta del <html> </html>.......
  #14 (permalink)  
Antiguo 17/02/2010, 11:49
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

david ahora estoy corriendo la pagina contacto.php me aparecen 46 errores y 42 warnings.

estos son algunos:

# Line 10, column 31: XML Parsing Error: StartTag: invalid element name

if(miFormu.nick.value.length < 3) {

este error me dice algo del simbolo "<" menor que...... dice nombre de elemento invalido (en el codigo javascript)y no entiendo el por que? ni por que debo cambiarlo :((((

luego me salen muchos errores sobre el codigo que e pegado de google maps para el link del mapa externo de esta seccion contactos.....debo de ignorar esto? es normal este error????

este es uno de los numerosos errores que me da sobre el link del mapa:

cannot generate system identifier for general entity X



An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.

* Line 107, column 46: cannot generate system identifier for general entity "source"

…ref="http://maps.google.es/maps?f=q&source=s_q&hl=es&geocode=&q=calle+comedia
  #15 (permalink)  
Antiguo 17/02/2010, 11:50
sergio87
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: validar html y css de w3c

directamente el código lo vas a tener que poner vos Rufus. Al menos por ahora no conozco hosting que te escriban ellos los códigos.. jajaajaja

te recomiendo usar http://translate.google.com.ar/?hl=es&tab=wT#en|es|
para que puedas entender mejor los mensajes de error que te aparecen.
  #16 (permalink)  
Antiguo 17/02/2010, 11:52
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

El código Javascript es mejor que lo tengas en un archivo separado y sólo lo referencias en el src del tag script. De lo contrario, usa un bloque CDATA para que sea ignorado por el parser.

En lugar de &, usa &amp;
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #17 (permalink)  
Antiguo 17/02/2010, 12:02
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

ok david pero no me funciona ahora el menu al haber puesto el codigo javascript fuera de la pagina...te explico lo que he hecho asi llamo a la pagina donde esta el codigo javascript:

<link href="javascriptmenu.html" rel="stylesheet" type="text/javascript">

y en la otra pagina esta el codigo dentro de <head> y </head>.... pero no me funciona ahora el cambio de imagen....que he hecho mal?
  #18 (permalink)  
Antiguo 17/02/2010, 12:04
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

Esa no es la forma correcta de hacer referencia a un script externo. Lee nuevamente lo que te indiqué:
Cita:
Iniciado por David Ver Mensaje
El código Javascript es mejor que lo tengas en un archivo separado y sólo lo referencias en el src del tag script.
Código HTML:
Ver original
  1. <script src="archivo.js" type="text/javascript"></script>
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #19 (permalink)  
Antiguo 17/02/2010, 12:07
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

ok pero dices src="archivo.js" tengo que crear un archivo nuevo que sea tipo javascript????
  #20 (permalink)  
Antiguo 17/02/2010, 12:14
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: validar html y css de w3c

Por favor, lee cuidadosamente la respuesta:
Cita:
Iniciado por David Ver Mensaje
El código Javascript es mejor que lo tengas en un archivo separado y sólo lo referencias en el src del tag script.
Si antes tenías esto:
Código HTML:
Ver original
  1. <script type="text/javascript">
  2.     alert("<&> Código no válido para el parser");
Creas un nuevo archivo con el contenido:
Código Javascript:
Ver original
  1. alert("<&> Código no válido para el parser");
Y luego lo referencias:
Código HTML:
Ver original
  1. <script type="text/javascript" src="nombre_del_archivo.js"></script>
Cuando no entiendas una respuesta, lo mejor es que investigues y hagas pruebas antes de volver a preguntar, de esa forma aprenderás más.

Saludos.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #21 (permalink)  
Antiguo 17/02/2010, 12:18
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 14 años, 11 meses
Puntos: 1
Respuesta: validar html y css de w3c

ok ok...me pongo a investigar en google.....gracias por la paciencia y la ayuda david :)

Etiquetas: validar, w3c
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 10:26.