Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    60
    Thanks
    6
    Thanked 0 Times in 0 Posts

    XHTML Validating Problems

    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):
    Code:
    <?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.
    Last edited by brownleaf; 08-31-2008 at 12:44 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Post a link to your page to get help. You might have missed to close some div tags </body>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    60
    Thanks
    6
    Thanked 0 Times in 0 Posts

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    There are 31 opening div, but only 30 of them are closed. And the validator assumes, it might be happened to the first div, <div id="doc" class="yui-t7">

    </body>

    <script type="text/javascript">
    Rounded('rounded', 10, 10);
    </script>

    </html>
    Also, the above script must be before </body>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder
    Join Date
    May 2008
    Location
    Lost in Localhost...
    Posts
    702
    Thanks
    3
    Thanked 43 Times in 42 Posts
    Code removed
    Last edited by Millenia; 09-01-2008 at 09:17 AM. Reason: There you go :)

  • #6
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I have similar problems...
    I am using a template in dreamweaver. All the pages work fine with the template but i have this page which is giving me a hard time to identify the errors

    i removed all the <div> and <p> tags with no luck

    any idea of what is wrong?

    Validation Output: 10 Errors
    Line 71, Column 147: end tag for "td" omitted, but OMITTAG NO was specified.
    …right syntax to use near '' at line 1✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 68, Column 4: start tag was here.
    <td height="370" valign="top" bgcolor="#FFFFFF" class="text"><br/> Line 71, Column 147: end tag for "tr" omitted, but OMITTAG NO was specified.
    …right syntax to use near '' at line 1✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 66, Column 2: start tag was here.
    <tr> Line 71, Column 147: end tag for "table" omitted, but OMITTAG NO was specified.
    …right syntax to use near '' at line 1✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 65, Column 0: start tag was here.
    <table width="100&#37;" border="0" cellspacing="0" cellpadding="0"> Line 71, Column 147: end tag for "body" omitted, but OMITTAG NO was specified.
    …right syntax to use near '' at line 1✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 47, Column 0: start tag was here.
    <body bgcolor="#d0d4ae" class="body"> Line 71, Column 147: end tag for "html" omitted, but OMITTAG NO was specified.
    …right syntax to use near '' at line 1✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    Line 2, Column 0: start tag was here.
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- #BeginTemplate "/Templates/Lotte Line 71, Column > 80: XML Parsing Error: Premature end of data in tag td line 68.
    …k the manual that corresponds to your MySQL server version for the right synt…✉
    Line 71, Column > 80: XML Parsing Error: Premature end of data in tag tr line 66.
    …k the manual that corresponds to your MySQL server version for the right synt…✉
    Line 71, Column > 80: XML Parsing Error: Premature end of data in tag table line 65.
    …k the manual that corresponds to your MySQL server version for the right synt…✉
    Line 71, Column > 80: XML Parsing Error: Premature end of data in tag body line 47.
    …k the manual that corresponds to your MySQL server version for the right synt…✉
    Line 71, Column > 80: XML Parsing Error: Premature end of data in tag html line 2.
    …k the manual that corresponds to your MySQL server version for the right synt…✉


    the link is : http://stuweb.cms.gre.ac.uk/~tm566/Lottery/userConf.php

    thank you for your help

  • #7
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Posting a new thread for your issue would be nice.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #8
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Posting a new thread for your issue would be nice.

    upsss sowwy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •