Validation w3c

Résolu/Fermé
jupiler - 26 sept. 2009 à 23:11
 jupiler - 27 sept. 2009 à 20:42
Bonjour,

j ai des erreurs lors de ma validation w3c j en ai corrige plusieurs mais les 6 dernieres je n y arrive pas

voici les erreurs

# Error Line 58, Column 9: end tag for element "object" which is not open

</object>



The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.
# Error Line 79, Column 38: document type does not allow element "script" here

</html><script type="text/javascript">



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 83, Column 31: document type does not allow element "script" here

<script type="text/javascript">



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 58, Column 9: XML Parsing Error: Opening and ending tag mismatch: div line 57 and object

</object>


# Error Line 77, Column 6: XML Parsing Error: Opening and ending tag mismatch: body line 25 and div

</div>


# Error Line 78, Column 7: XML Parsing Error: Opening and ending tag mismatch: html line 3 and body

</body>


et voici le code de ma page merci de votre aide

<!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>
<link rel="icon" type="type/png" href="favicon.png" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<meta name="description" content="test"/>
<meta name="keywords" content="test"/>
<meta name="robots" content="index, follow"/>
<meta name="revisit-after" content="7 days"/>
<meta name="author" content="http://www.test.com"/>
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
<link href="css/cssdockmenu.css" rel="stylesheet" type="text/css" />
<title>Mbk</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript" src="js/interface.js"></script>

<!--[if lt IE 7]>
<style type="text/css">
.dock img { behavior: url(css/iepngfix.htc) }
</style>
<![endif]-->
</head>
<body>
<div id="page">
<div id="top">
<div id="top-flash">
<object type="application/x-shockwave-flash" data="HeaderAnim.swf" width="300" height="100"><param name="movie" value="HeaderAnim.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#fce1aa" />
</object>
</div>
<ul>
<li><img src="img/mbk.png" alt="mbk-header" /></li>
<li style="padding-left: 140px;">

<a href="http://localhost/mbk/index.php"><img src="img/fflag.png" alt="" /></a>
<a href="http://localhost/mbk/index.php"><img src="img/aflag.png" alt="" /></a>
</li>
</ul>
</div>
<div class="menu">
<span class="left"></span>
<ul>
<li><a href="index.php" target="_self" title="Home"><span>Home</span></a></li>
<li><a href="presentation.php" target="_self" title="About us"><span>About us</span></a></li>
<li><a href="kg.php" target="_self" title="Kg"><span>Kg</span></a></li>

<li><a href="ml.php" target="_self" title="Ml"><span>Ml</span></a></li>
<li><a href="ba.php" target="_self" title="ba"><span>ba</span></a></li>
<li><a href="news.php" target="_self" title="News"><span>News</span></a></li>
<li><a href="testimonials.php" target="_self" title="Testimonials"><span>Testimonials</span></a></li>
<li><a href="contact.php" target="_self" title="Contact"><span>Contact US</span></a></li>

</ul>
<span class="right"></span>
</div>
<div id="accueil">
<div id="accueil-cont">
</object>
<object type="application/x-shockwave-flash" data="slideshow.swf?xml_path=slideshow,xml.xml" width="700" height="500"><param name="movie" value="slideshow.swf?xml_path=slideshow,xml.xml" />
<param name="quality" value="high" />
</object>
<object type="application/x-shockwave-flash" data="flare.swf" width="700" height="114" ><param name="movie" value="flare.swf" />
<param name="allowFullScreen" value="true" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="scale" value="noscale" />
</object>

</div>
</div><div id="footer">
<ul>
<li>Mbk</li>
<li>905-752-2120</li>
<li><a style="color:#8f1a2c" href="mailto:contact@mbk.com">contact@mbk.com</a></li>
</ul>
</div>
<div class="copyright">Copyright © 2009, Mbk.com. Tous droits réservés. | Conception et réalisation <a href="http://www.test.com">ARM INFO</a></div>
</div>
</body>
</html><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-7361983-6");
pageTracker._trackPageview();
} catch(err) {}
</script>

2 réponses

scriptiz Messages postés 1424 Date d'inscription dimanche 21 décembre 2008 Statut Membre Dernière intervention 14 septembre 2023 425
26 sept. 2009 à 23:24
1° Quand tu ouvre <object>, tu met tes paramètres dedans, ensuite tu dois le fermer avec </object>.
2° Tes scripts javascript, il vaut mieux les mettres avant la fermeture de la balise HTML, et dans le cas du Google Analytics, juste avant de fermer la balise body.

Code sans erreurs :

<!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> 
<link rel="icon" type="type/png" href="favicon.png" /> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/> 
<meta name="description" content="test"/> 
<meta name="keywords" content="test"/> 
<meta name="robots" content="index, follow"/> 
<meta name="revisit-after" content="7 days"/> 
<meta name="author" content="http://www.test.com"/> 
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" /> 
<link href="css/cssdockmenu.css" rel="stylesheet" type="text/css" /> 
<title>Mbk</title> 
<link rel="stylesheet" type="text/css" href="style.css"/> 
<script type="text/javascript" src="js/jquery.js"></script> 

<script type="text/javascript" src="js/interface.js"></script> 

<!--[if lt IE 7]> 
<style type="text/css"> 
.dock img { behavior: url(css/iepngfix.htc) } 
</style> 
<![endif]--> 
</head> 
<body> 
<div id="page"> 
<div id="top"> 
<div id="top-flash"> 
<object type="application/x-shockwave-flash" data="HeaderAnim.swf" width="300" height="100"><param name="movie" value="HeaderAnim.swf" /> 
<param name="quality" value="high" /> 
<param name="bgcolor" value="#fce1aa" /> 
</object> 
</div> 
<ul> 
<li><img src="img/mbk.png" alt="mbk-header" /></li> 
<li style="padding-left: 140px;"> 

<a href="http://localhost/mbk/index.php"><img src="img/fflag.png" alt="" /></a> 
<a href="http://localhost/mbk/index.php"><img src="img/aflag.png" alt="" /></a> 
</li> 
</ul> 
</div> 
<div class="menu"> 
<span class="left"></span> 
<ul> 
<li><a href="index.php" target="_self" title="Home"><span>Home</span></a></li> 
<li><a href="presentation.php" target="_self" title="About us"><span>About us</span></a></li> 
<li><a href="kg.php" target="_self" title="Kg"><span>Kg</span></a></li> 

<li><a href="ml.php" target="_self" title="Ml"><span>Ml</span></a></li> 
<li><a href="ba.php" target="_self" title="ba"><span>ba</span></a></li> 
<li><a href="news.php" target="_self" title="News"><span>News</span></a></li> 
<li><a href="testimonials.php" target="_self" title="Testimonials"><span>Testimonials</span></a></li> 
<li><a href="contact.php" target="_self" title="Contact"><span>Contact US</span></a></li> 

</ul> 
<span class="right"></span> 
</div> 
<div id="accueil"> 
<div id="accueil-cont"> 
<object type="application/x-shockwave-flash" data="slideshow.swf?xml_path=slideshow,xml.xml" width="700" height="500"><param name="movie" value="slideshow.swf?xml_path=slideshow,xml.xml" /> 
<param name="quality" value="high" /> 
</object>
<object type="application/x-shockwave-flash" data="flare.swf" width="700" height="114" ><param name="movie" value="flare.swf" /> 
<param name="allowFullScreen" value="true" /> 
<param name="quality" value="high" /> 
<param name="wmode" value="transparent" /> 
<param name="scale" value="noscale" /> 
</object> 

</div> 
</div><div id="footer"> 
<ul> 
<li>Mbk</li> 
<li>905-752-2120</li> 
<li><a style="color:#8f1a2c" href="mailto:contact@mbk.com">contact@mbk.com</a></li> 
</ul> 
</div> 
<div class="copyright">Copyright © 2009, Mbk.com. Tous droits réservés. | Conception et réalisation <a href="http://www.test.com">ARM INFO</a></div> 
</div> 
<script type="text/javascript"> 
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 

</script> 
<script type="text/javascript"> 
try{ 
var pageTracker = _gat._getTracker("UA-7361983-6"); 
pageTracker._trackPageview(); 
} catch(err) {} 
</script>
</body> 
</html>
1
merci beaucoup scriptiz ma page d accueil es maintenant xhtml valide :-) en fait il y avait le probleme de java et un </object> qui se baladait merciiii
0