Validation W3C qui echoue

Validation W3C qui echoue - HTML/CSS - Programmation

Marsh Posté le 22-08-2008 à 21:47:44    

Salut,...
 
Comme le dit le titre, ma validation W3C echoue, pour des raisons apparement abusive...
 
J'ai modifié un page de type HTML 4.0 vers XHTML 1.0 STRICT
 
Je place la page sur un serveur Apache hébergé par mon pc personnel. Et je valide...
 

Code :
  1. <!DOCTYPE html PUBLIC
  2. "-//W3C//DTD XHTML 1.0 Strict//EN"  
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
  5.    <head>
  6.        <title>Cours XHTML 1.0 Strict et CSS 2.0 - Les balises</title>
  7.        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  8.    </head>
  9.  <body>
  10.   <h2>Les balises et attributs</h2>
  11.    <p>Avant de commencer la rédaction de votre première page vous devez apprendre la syntaxe du XHTML.<br />
  12.    La syntaxe quel que soit la langue est la base de la communication. Pour afficher correctement vos pages web, le navigateurs lit le XHTML.<br />
  13.    Si vous commetez des erreurs de syntaxe le navigateur n'affichera pas correctement votre page.<br />
  14.    La syntaxe du XHTML se base sur un ensemble de balises et d'attributs.
  15.    <h3>Les balises</h3>
  16.     <p>Les balises commence par "<" etse termine par ">"<br />
  17.     Il existe deux types de balises. La plupart apparaissent toujours par paire et d'autres apparaissent seules.</p>
  18.     <p>Il est important de noter que les balises sont toujours invisibles pour les visiteurs. Elles servent de marqueurs pour indiquer des informations au navigateurs.<br />
  19.     Par exmple, une balise permet de donner le titre de votre site web tandis que d'autre permette de créer des paragraphes.</p>
  20.     <ul>
  21.      <li>
  22.       <h4>Les balises existant par paire:</h4>
  23.        <p>Ce sont les balises les plus courante.<br />
  24.        On écrit la première balise, on tape du texte, puis on ferme la balise en la réécrivant avec un slash devant "/".</p>
  25.        <blockquote>
  26.        <caption>Code XHTML 1.0 Strict</caption>
  27.        <pre>&lt;titre&gt;Titre de votre site&lt;/titre&gt;</pre>
  28.        </blockquote>
  29.      </li>
  30.      <li>
  31.       <h4>Les balises seules:</h4>
  32.        <p>Ces balises sont plus rares, mais il y en a quand même. Elles servent généralement à insétrer un élément.<br />
  33.        Ce type de balise se termine toujours par un slash "/", mais cette fois le slash se trouve à la fin de la balise.
  34.        <blockquote>
  35.        <caption>Code XHTML 1.0 Strict</caption>
  36.        <pre>&lt;image /&gt;</pre>
  37.        </blockquote>
  38.      </li>
  39.     </ul>
  40.     <p>Avec l'expérience vous devrez être capable de différencier les types de balises auquel vous serez confrontés.</p>
  41.     <ul>
  42.      <li>Si vous voyez une balise &lt;balise&gt;, c'est qui s'agit forcément d'une balise existant par pair, et donc que vous retrouverez la balise &lt;/balise&gt; un peu plus loin, pour indiquer la fin de la balise.</li>
  43.      <li>si vous voyez une balise &lt;balise /&gt;, c'est une balise seul.
  44.     </ul>
  45.  </body>
  46. </html>


 
Et je recois 27erreurs ce qui est impossible de prime abord...
 
les voila
 
#  Error  Line 17, Column 7: document type does not allow element "h3" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
    <h3>Les balises</h3>
 

 
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>" ).
# Error Line 19, Column 7: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
     <p>Les balises commence par "<" etse termine par ">"<br />
 

 
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>" ).
# Warning Line 19, Column 34: character "<" is the first character of a delimiter but occurred as data.
 
     <p>Les balises commence par "<" etse termine par ">"<br />
 

 
This message may appear in several cases:
 
    * You tried to include the "<" character in your page: you should escape it as "&lt;"
    * You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
    * Another possibility is that you forgot to close quotes in a previous tag.
 
# Error Line 21, Column 7: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
     <p>Il est important de noter que les balises sont toujours invisibles pour  
 

 
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>" ).
# Error Line 23, Column 8: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
     <ul>
 

 
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>" ).
# Error Line 31, Column 16: document type does not allow element "caption" here; assuming missing "table" start-tag.
 
        <caption>Code XHTML 1.0 Strict</caption>  
 

# Error Line 32, Column 12: document type does not allow element "pre" here.
 
        <pre>&lt;titre&gt;Titre de votre site&lt;/titre&gt;</pre>
 

 
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).
# Error Line 33, Column 20: "table" not finished but containing element ended.
 
        </blockquote>
 

# Error Line 33, Column 20: end tag for "table" omitted, but OMITTAG NO was specified.
 
        </blockquote>
 

 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 31, Column 8: start tag was here.
 
        <caption>Code XHTML 1.0 Strict</caption>  
 
# Error Line 42, Column 19: document type does not allow element "blockquote" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
        <blockquote>
 

 
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>" ).
# Error Line 43, Column 16: document type does not allow element "caption" here; assuming missing "table" start-tag.
 
        <caption>Code XHTML 1.0 Strict</caption>
 

# Error Line 44, Column 12: document type does not allow element "pre" here.
 
        <pre>&lt;image /&gt;</pre>
 

 
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).
# Error Line 45, Column 20: "table" not finished but containing element ended.
 
        </blockquote>
 

# Error Line 45, Column 20: end tag for "table" omitted, but OMITTAG NO was specified.
 
        </blockquote>
 

 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 43, Column 8: start tag was here.
 
        <caption>Code XHTML 1.0 Strict</caption>
 
# Error Line 46, Column 10: end tag for "p" omitted, but OMITTAG NO was specified.
 
      </li>
 

 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 39, Column 8: start tag was here.
 
        <p>Ces balises sont plus rares, mais il y en a quand même. Elles servent
 
# Error Line 49, Column 7: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
     <p>Avec l'expérience vous devrez être capable de différencier les types de  
 

 
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>" ).
# Error Line 50, Column 8: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag.
 
     <ul>
 

 
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>" ).
# Error Line 53, Column 9: end tag for "li" omitted, but OMITTAG NO was specified.
 
     </ul>  
 

 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 52, Column 6: start tag was here.
 
      <li>si vous voyez une balise &lt;balise /&gt;, c'est une balise seul.
 
# Error Line 56, Column 8: end tag for "p" omitted, but OMITTAG NO was specified.
 
  </body>
 

 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 12, Column 4: start tag was here.
 
    <p>Avant de commencer la rédaction de votre première page vous devez apprend
 
# Error Line 19, Column 35: XML Parsing Error: StartTag: invalid element name.
 
     <p>Les balises commence par "<" etse termine par ">"<br />
 

# Error Line 46, Column 11: XML Parsing Error: Opening and ending tag mismatch: p line 39 and li.
 
      </li>
 

# Error Line 47, Column 10: XML Parsing Error: Opening and ending tag mismatch: li line 36 and ul.
 
     </ul>
 

# Error Line 53, Column 10: XML Parsing Error: Opening and ending tag mismatch: li line 52 and ul.
 
     </ul>  
 

# Error Line 56, Column 9: XML Parsing Error: Opening and ending tag mismatch: ul line 50 and body.
 
  </body>
 

# Error Line 57, Column 7: XML Parsing Error: Opening and ending tag mismatch: ul line 23 and html.
 
</html>
 

# Error Line 57, Column 7: XML Parsing Error: Premature end of data in tag p line 12.
 
</html>
 

# Error Line 57, Column 7: XML Parsing Error: Premature end of data in tag body line 9.
 
</html>
 

# Error Line 57, Column 7: XML Parsing Error: Premature end of data in tag html line 4.
 
</html>
 
J'aimerais comprendre...

Reply

Marsh Posté le 22-08-2008 à 21:47:44   

Reply

Marsh Posté le 22-08-2008 à 22:37:09    

Bonsoir,
 
Je ne sais pas comment dire...Le code n'est pas le même entre HTML et XHTML 1.0 STRICT, il ne suffit pas de changer le Doctype. Y a des balises qui ne sont plus tolérés, comme les balises <H1>,... il me semble.
 
Ensuite tout est dans la description des erreurs, difficile de dire plus, je pense pas qu'une forumeurs te détaille chacune des 27 erreurs...
 
Il existe un site de validation W3C en français avec les descriptions d'erreurs en français.  
Je n'ai pas l'URL en tête. Je l'avais trouvés sur des forums spécialisés.
 
Bon courage


Message édité par cvb le 22-08-2008 à 22:44:22
Reply

Marsh Posté le 22-08-2008 à 23:09:35    

Justement tout le code à été modifié pas juste le Doctype... c'est ca qui m'étonne etant donné que j'ai modifier la page entièrement avec un livre XHTML 1.0 stricte...
 
Si tu retrouves le validateur W3C avec erreur en FR je suis preneur. je vais chercher de mon coté... c'est tt de même plus commode que l'anglais... en plus leur soit disans indication de correction ne m'informe pas vraiment lol...
 
De source sur les balise titre <h1> sont tjs fonctionnelles


Message édité par Sephirius2 le 22-08-2008 à 23:15:39
Reply

Marsh Posté le 22-08-2008 à 23:28:16    

Y'a un <p> pas fermé là, avant le premier h3. Du coup il croit que le h3 est dans le p, ce qui est invalide.

 

Y'a aussi les caractères < et > (que tu cites dans le deuxième paragraphe) qui ne peuvent être inscrite comme ça, il faut remplacer < par &lt; et > par &gt; (et accessoirement & par &amp; si le cas se présente).


Message édité par FlorentG le 22-08-2008 à 23:28:44
Reply

Marsh Posté le 22-08-2008 à 23:59:47    

Validateur en français http://www.validome.org/
 
Certaine traduction ne sont pas encore en français...
 
J'ai corrigé mon code... 4 erreur de syntaxe => 27 erreurs de lecture par le navigateur

Reply

Marsh Posté le 23-08-2008 à 06:51:59    

des raisons abusives [:rofl]
tu sais meme pas a quoi sert la balise caption [:rofl]


---------------
« The enemy is the gramophone mind, whether or not one agrees with the record that is being played at the moment. » — George Orwell
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed