Pourquoi valider la page?
Parce que si une page n'est pas validée, elle est mal interprétée et tous vos efforts n'auront servi à rien.
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml xml.lang="fr" lang="fr">
<meta NAME="description" content="Page de validation">
</head><body>
<img SRC="image.jpg" width=120 height=180 />
<br><br>
Bonjour & au revoir
</body>
</html>
This page is not Valid (no Doctype found)!
Below are the results of attempting to parse this document with an SGML parser.
1. Error Line 3 column 51: value of fixed attribute "XMLNS" not equal to default.
<html xmlns="http://www.w3.org/1999/xhtml xml.lang="fr" lang="fr">
2. Error Line 3 column 54: an attribute value literal can occur in an attribute specification list only after a VI delimiter.
<tml xmlns="http://www.w3.org/1999/xhtml xml.lang="fr" lang="fr">
Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value".
3. Error Line 3 column 56: character data is not allowed here.
<html xmlns="http://www.w3.org/1999/xhtml xml.lang="fr" lang="fr">
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
4. Error Line 4 column 53: start tag for "HEAD" omitted, but its declaration does not permit this.
<meta NAME="description" content="Page de validation">
5. Error Line 5 column 6: end tag for "HEAD" which is not finished.
</head><body>
Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
6. Error Line 6 column 42: required attribute "ALT" not specified.
<img SRC="image.jpg" width=120 height=180 />
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>.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head><title>Ma page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Page de validation" />
</head><body>
<img src="image.jpg" alt="image introuvable" width="120" height="180" />
<br />
Bonjour &amp; au revoir
</body>
</html>
