1 erreur validation w3c je comprends pas

nounours -  
monkey_monk Messages postés 681 Statut Membre -
Bonjour,

J'ai un problème avec la validation w3C qui surligne en rouge le " avant middle et je ne vois pas pourquoi. Si je l'enlève le prix 2 euros ne sera pas centrer verticalement à l'image.

<h4> <img src ="Images/100_1188.jpg" height="220" align="middle" alt="100_1188" /> <img src ="Images/100_1189.jpg" height="220" align="middle" alt="100_1189" /> prix : 2 euros </h4> <br />


Réponse du w3c

Line 25, Column 61: Attribute "align" exists, but can not be used for this element.
…es/100_1188.jpg" height="220" align="middle" alt="100_1188" /> <img src ="Im✉
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.

3 réponses

Passarinho44 Messages postés 977 Statut Contributeur 132
 
Et bien je pense que le message est clair : le align existe mais on ne l'utilise pas pour une image.
Pour le centrer je te conseille le CSS.
0
greg
 
Ton Doctype est sans doute de type strict et donc ne te permet pas l'utilisation de l'attribut align comme dit précédemment le CSS est de rigueur pour ta mise en page.

Cordialement.
0
monkey_monk Messages postés 681 Statut Membre 131
 
CQFD :D
0