Bonjour à tous et à toutes, comme précisé dans le titre, je rencontre quelques difficultés avec la validation de certaines de mes pages html.
J'ai un projet de site basique à faire pour mon école, j'ai beau lire et relire mes cours, et mes codes, mais quelque chose m'échappe.
Pour ma page d'accueil, l'erreur concerne une balise <c></c> qui renvoit à ma feuille de style css. Lorsque j'ouvre ma page dans le navigateur, le paragraphe situé entre les balises est conforme à ma feuille de style, les balises fonctionnent donc. Mais le validator me dit qu'elle n'est pas valable, je ne comprends pas. Voici le code de ma page:
et le message d'erreur du validator:
Line 30,(1ère ligne) Column 35: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<table border="0" cellpadding="20">
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>").
Et sur ma troisième page, 6 erreurs.
C'est une page que j'ai divisée en deux frames.
Voici le code:
et les erreurs détectées par le validator:
Line 21, Column 16: there is no attribute "cols"
<frameset cols="200,*">
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.
# Error Line 21, Column 23: element "frameset" undefined
<frameset cols="200,*">
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 22, Column 14: there is no attribute "src"
<frame src="urbain.html"/>
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.
# Error Line 22, Column 28: element "frame" undefined
<frame src="urbain.html"/>
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 23, Column 30: element "frame" undefined
<frame src="insolite.html"/>
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 25, Column 7: end tag for "html" which is not finished
</html>
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, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
Je suis désolée pour la longueur du post, mais mon projet n'est pas en ligne donc peux pas faire plus court!
Ce que j'ai du mal à comprendre c'est que j'ai beau me replonger dans mes cours et sur le net et vérifier mes codes, le validator trouve toujours des erreurs.
Pourriez-vous m'éclairer?
Merci d'avance
J'ai un projet de site basique à faire pour mon école, j'ai beau lire et relire mes cours, et mes codes, mais quelque chose m'échappe.
Pour ma page d'accueil, l'erreur concerne une balise <c></c> qui renvoit à ma feuille de style css. Lorsque j'ouvre ma page dans le navigateur, le paragraphe situé entre les balises est conforme à ma feuille de style, les balises fonctionnent donc. Mais le validator me dit qu'elle n'est pas valable, je ne comprends pas. Voici le code de ma page:
<!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">
<head>
<title>Bienvenue</title>
<!--feuille de style-->
<style type="text/css">
@import url(css/style1.css);
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-langage" content="fr"/>
<meta name="description" content="mon site perso"/>
<meta name="keywords" content="bienvenue, mon, site, perso, ash"/>
<meta name="robots" content="all"/>
</head>
<!--image de fond-->
<body background="images/accueil0.jpg">
<font>
<!--saut de lignes-->
<br/><br/><br/><br/><br/><br/><br/>
<!--gros titre clignotant-->
<c>
Bienvenue sur mon site
</c>
<!--saut de lignes-->
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<!--lien vers menu-->
<a href="menu.html">Entrer</a>
</font>
</body>
</html>
</code>
La seconde erreur concerne mon menu.
Je l'ai présenté sous forme de tableau. Voici le code de ma page:
[code=html]
<!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">
<head>
<title>Bienvenue</title>
<!--feuille de style-->
<style type="text/css">
@import url(css/style1.css);
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-langage" content="fr"/>
<meta name="description" content="mon site perso"/>
<meta name="keywords" content="bienvenue, mon, site, perso, ash"/>
<meta name="robots" content="all"/>
</head>
<body bgcolor="#000000">
<font>
<b>
<font size="7">
Menu
</font>
</b>
<br/><br/><br/><br/><br/><br/>
<!--menu sous forme de tableau-->
<table border="0" cellpadding="20">
<tr> <td>
<a href="presentation.html">Présentation</a>
</td> </tr>
<tr> <td>
<a href="photos.html">Photos</a>
</td> </tr>
<tr> <td>
<a href="contact.html">Contact</a>
</td> </tr>
</table>
</font>
<!--saut de lignes-->
<br/><br/><br/><br/>
<p align="center">
<a href="accueil.html">Retour à l'accueil</a>
</p>
</body>
</html>
et le message d'erreur du validator:
Line 30,(1ère ligne) Column 35: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<table border="0" cellpadding="20">
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>").
Et sur ma troisième page, 6 erreurs.
C'est une page que j'ai divisée en deux frames.
Voici le code:
<!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">
<head>
<title>Bienvenue</title>
<!--feuille de style-->
<style type="text/css">
@import url(css/style1.css);
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-langage" content="fr"/>
<meta name="description" content="mon site perso"/>
<meta name="keywords" content="bienvenue, mon, site, perso, ash"/>
<meta name="robots" content="all"/>
</head>
<frameset cols="200,*">
<frame src="urbain.html"/>
<frame src="insolite.html"/>
</frameset>
</html>
et les erreurs détectées par le validator:
Line 21, Column 16: there is no attribute "cols"
<frameset cols="200,*">
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.
# Error Line 21, Column 23: element "frameset" undefined
<frameset cols="200,*">
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 22, Column 14: there is no attribute "src"
<frame src="urbain.html"/>
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.
# Error Line 22, Column 28: element "frame" undefined
<frame src="urbain.html"/>
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 23, Column 30: element "frame" undefined
<frame src="insolite.html"/>
You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
# Error Line 25, Column 7: end tag for "html" which is not finished
</html>
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, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
Je suis désolée pour la longueur du post, mais mon projet n'est pas en ligne donc peux pas faire plus court!
Ce que j'ai du mal à comprendre c'est que j'ai beau me replonger dans mes cours et sur le net et vérifier mes codes, le validator trouve toujours des erreurs.
Pourriez-vous m'éclairer?
Merci d'avance