brownleaf
08-31-2008, 12:42 PM
I've run my site through a validator but I cannot understand these errors. Would you please explain them to me?
Error 1:
Line 94, Column 6: end tag for "div" 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 ">".
Error 2:
Line 14, Column 0: start tag was here.
<div id="doc" class="yui-t7">
Error 3:
Line 97, Column 30: 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 4:
Line 67, Column > 80: XML Parsing Error: attributes construct error.
…ver="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "…
Error 5:
Line 67, Column > 80: XML Parsing Error: Couldn't find end of Start Tag img line 67.
…ver="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "…
Error 6:
Line 101, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 13 and html.
</html>
Error 7:
Line 101, Column 7: XML Parsing Error: Premature end of data in tag html line 2.
</html>
This is the page that was run through the validator (with the chunks that have errors bolded):
<?php
if (isset($_GET['skin']) && is_numeric($_GET['skin']) && is_dir('/home/grabacom/public_html/khigo.com/skins/' . $_GET['skin'])) {
setcookie("myskin", $_GET['skin'], time()+(31*86400));
}
?>
<!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="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/reset-fonts-grids2.css"/>
<script src="http://khigo.com/rounded.js" type="text/javascript"></script>
<script src="http://khigo.com/scroller.js" type="text/javascript"></script>
<?php include('code.php'); ?>
</head>
<body>
<div id="doc" class="yui-t7">
<div id="hd">
<p id="ep"> </p>
<div id="masthead" class="rounded"><p>cis interact club</p></div>
<p id="ep2"> </p>
</div>
<div class="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gb">
<div class="yui-u first"> <div id="mainONE" class="rounded" onclick="window.location.href='index.php'">news</div></div>
<div class="yui-u second">
<div id="mainTWO" class="rounded" onclick="window.location.href='index.php'">
about</div>
</div>
<div class="yui-u third">
<div id="mainTHREE" class="rounded" onclick="window.location.href='activities.php'">
activities</div>
</div>
<div class="yui-u fourth">
<div id="mainFOUR" class="rounded" onclick="window.location.href='ask.php'">
ask</div>
</div>
</div>
</div>
</div>
</div>
<div id="ft" class="rounded">
<p>FOOTER</p>
</div>
<div class="bd">
<div id="yui-main2">
<div class="yui-b">
<div class="yui-gb">
<div class="yui-u first">
<div id="extraftONE" class="rounded">
<div onmouseout="stopScrolling();" onmouseover="scrollDivUp('swatches');" class="scroller"><img src="/up.gif" alt=" "/></div>
<div id="swatches">
<p>
<a href="index.php?skin=2"><img src="01.gif" alt=" "/></a>
<a href="index.php?skin=2"><img src="01.gif" alt=" "/></a>
</p>
</div>
<div onmouseout="stopScrolling();" onmouseover="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "/></div>
</div></div>
<div class="yui-u second">
<div id="extraftTWO" class="rounded">
<p>
<a href="http://google.com"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p> <p>
<a href="http://google.com"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p></div>
</div>
<div class="yui-u third">
<div id="extraftTHREE" class="rounded">
activities</div>
</div>
<div class="yui-u fourth">
<div id="extraftFOUR" class="rounded">
ask</div></div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
Rounded('rounded', 10, 10);
</script>
</html>
Thank you very very much.
Error 1:
Line 94, Column 6: end tag for "div" 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 ">".
Error 2:
Line 14, Column 0: start tag was here.
<div id="doc" class="yui-t7">
Error 3:
Line 97, Column 30: 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 4:
Line 67, Column > 80: XML Parsing Error: attributes construct error.
…ver="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "…
Error 5:
Line 67, Column > 80: XML Parsing Error: Couldn't find end of Start Tag img line 67.
…ver="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "…
Error 6:
Line 101, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 13 and html.
</html>
Error 7:
Line 101, Column 7: XML Parsing Error: Premature end of data in tag html line 2.
</html>
This is the page that was run through the validator (with the chunks that have errors bolded):
<?php
if (isset($_GET['skin']) && is_numeric($_GET['skin']) && is_dir('/home/grabacom/public_html/khigo.com/skins/' . $_GET['skin'])) {
setcookie("myskin", $_GET['skin'], time()+(31*86400));
}
?>
<!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="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/reset-fonts-grids2.css"/>
<script src="http://khigo.com/rounded.js" type="text/javascript"></script>
<script src="http://khigo.com/scroller.js" type="text/javascript"></script>
<?php include('code.php'); ?>
</head>
<body>
<div id="doc" class="yui-t7">
<div id="hd">
<p id="ep"> </p>
<div id="masthead" class="rounded"><p>cis interact club</p></div>
<p id="ep2"> </p>
</div>
<div class="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gb">
<div class="yui-u first"> <div id="mainONE" class="rounded" onclick="window.location.href='index.php'">news</div></div>
<div class="yui-u second">
<div id="mainTWO" class="rounded" onclick="window.location.href='index.php'">
about</div>
</div>
<div class="yui-u third">
<div id="mainTHREE" class="rounded" onclick="window.location.href='activities.php'">
activities</div>
</div>
<div class="yui-u fourth">
<div id="mainFOUR" class="rounded" onclick="window.location.href='ask.php'">
ask</div>
</div>
</div>
</div>
</div>
</div>
<div id="ft" class="rounded">
<p>FOOTER</p>
</div>
<div class="bd">
<div id="yui-main2">
<div class="yui-b">
<div class="yui-gb">
<div class="yui-u first">
<div id="extraftONE" class="rounded">
<div onmouseout="stopScrolling();" onmouseover="scrollDivUp('swatches');" class="scroller"><img src="/up.gif" alt=" "/></div>
<div id="swatches">
<p>
<a href="index.php?skin=2"><img src="01.gif" alt=" "/></a>
<a href="index.php?skin=2"><img src="01.gif" alt=" "/></a>
</p>
</div>
<div onmouseout="stopScrolling();" onmouseover="scrollDivDown('swatches');" class="scroller"><img src="/down.gif"alt=" "/></div>
</div></div>
<div class="yui-u second">
<div id="extraftTWO" class="rounded">
<p>
<a href="http://google.com"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p> <p>
<a href="http://google.com"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p></div>
</div>
<div class="yui-u third">
<div id="extraftTHREE" class="rounded">
activities</div>
</div>
<div class="yui-u fourth">
<div id="extraftFOUR" class="rounded">
ask</div></div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
Rounded('rounded', 10, 10);
</script>
</html>
Thank you very very much.