Problema con el doctype

Iniciado por CarloxTheBoy, 21 Junio 2012, 14:33 PM

0 Miembros y 1 Visitante están viendo este tema.

CarloxTheBoy

programo paginas web en XHTML 1.0 Strict, pero siempre que valido una pagina en un validador, me da un error. Aquí pongo una pagina simple y los errores que me dan para que lo veais.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta htp-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Albert I | El primer mono astronauta</title>
  </head>
  <body>
  <p><img src="famous_primates_brand.png" alt="aaa" /></p>
  <h1>Albert</h1>
  <p>On June 11, 1948, Albert I - the first monkey astronaut - launched into space on a V-2 Blossom III rocket from White Sands Proving Ground, a NASA space station in New Mexico. The first of four monkeys (Albert I-IV) launched into space between June 1948 and December 1949, Albert was the original monkey pioneer.</p>
  <p>Albert's journey would begin a fruitful period of research for NASA which would culminate in Neil Armstrong's momentous journey to the moon. One small step for man, one giant leap for primatekind. Sadly, a lack of fanfare resulted in Albert I remaining an unsung hero of animal astronauts.</p>
  <p><img src="albert.jpg" title="Albert" alt="El Mono astronauta Albert" /></p>
  <!-- Soy muy vago y no lo traduzco al español -->
  </body>
</html>


Line 5, Column 21: there is no attribute "htp-equiv"
    <meta htp-equiv="Content-Type" content="text/html; charset=UTF-8">

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.

Line 5, Column 71: end tag for "meta" omitted, but OMITTAG NO was specified
    <meta htp-equiv="Content-Type" content="text/html; charset=UTF-8">

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 5, Column 5: start tag was here
    <meta htp-equiv="Content-Type" content="text/html; charset=UTF-8">

CarloxTheBoy

Ya nada, me di cuenta del error. Tenia que incluir   <meta htp-equiv="Content-Type" content="text/html; charset=UTF-8"> en la etiqueta <html>, ya esta todo arreglado.

Doodleo

Creo que en verdad el error es que has puesto htp-equiv en vez de http-equiv, te faltaba una t, la línea de codificación debe ir en el head de la página.