Jump to content
JASPER

Help with HTMl errors please

Recommended Posts

I am at a loss to undersatnd what I need to do to fix these errors which appear common on my website:

 

From the home page:

  1. Line 15, Column 23: document type does not allow element "STYLE" here
  2. <style type="text/css">

  3.  


  4.  
    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).

  5.  
    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).


  1.  
    Line 432, Column 7: end tag for element "HEAD" which is not open

  2.  
     
    </head>

  3.  


  4.  
    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.

  5.  
    If this error occurred in a script section of your document, you should probably read this FAQ entry.

  6. Line 434, Column 112: document type does not allow element "BODY" here
     
    …00" alink="#20a8fc" text="#000000" style="background: #e3effc; height:2388px;">

     
    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).

  7. Line 437, Column 145: there is no attribute "ONLOAD"
     
    …183" name="qs_183" title="" alt="wp07490dc0.png" onload="OnLoadPngFix()"></div>

     
    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.


  8. Line 444, Column 12: required attribute "TYPE" not specified
     
    <script>

     
    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>.


  9. Line 459, Column 168: unclosed end-tag requires SHORTTAG YES
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

     
    The construct </foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.


  10. Line 459, Column 168: end tag for element "B" which is not open
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

     
    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.


  11. Line 459, Column 174: unclosed end-tag requires SHORTTAG YES
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

     
    The construct </foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.


  12. Line 459, Column 174: end tag for element "FONT" which is not open
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

     
    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.


  13. Line 459, Column 181: delimiter """ invalid: only S separators and TAGC allowed here
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")



  14. Line 459, Column 181: end tag for element "SMALL" which is not open
     
    …+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

     
    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.


  15. Line 464, Column 44: unclosed end-tag requires SHORTTAG YES
     
    </a</font></p>

     
    The construct </foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.


  16. Line 464, Column 44: end tag for element "A" which is not open
     
    </a</font></p>
     
    Can someone advise what I need to do. I will learn from your response and maybe able to correct the rest by trial and error.

Share this post


Link to post
Share on other sites

First, change this:

><meta name="google-site-verification" content="UplYHtP3ADnDH5fPvuXPoTbKMVrpFY-X49b38X79yOU" />

to

><meta name="google-site-verification" content="UplYHtP3ADnDH5fPvuXPoTbKMVrpFY-X49b38X79yOU">

Why? Because your DOCTYPE at the top of the coding says you are using HTML 4.01 but the Google meta tag is for XHTML>

 

Images do not have an onload event attribute. Scroll down here: http://www.w3schools.com/tags/tag_img.asp This is probably for transparent .png images because early editiona of IE do not support transparent .pngs. Easier to make all transparent images transparent .gifs than use a script.

 

><script>

Should be

><script type="text/javascript">

 

>document.write("<large><font color='0000FF' face='Verdana'><b>"+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b</font</small")

Should be

>document.write("<large><font color='0000FF' face='Verdana'><b>"+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b></font></large>")

After you fix this one you are going to still get errors for large, font and bold. Validator just doesn't get that this is a script.

 

><p align="center"><font face="verdana, helvetica" size="-4">
                                       </a></font></p>

You have some lonesome stuff here. Just remove it.

 

>    <a href="http://www.brand-newhomes.co.uk/" target="_self"><img alt="" id="wp_menubar0_0" src="_wp_generated/wp452d5477.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_0',wp_menubar0,null);" onmouseout="wp_MenuItemOut('wp_menubar0_0',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="buying-a-new-home.htm" target="_self"><img alt="" id="wp_menubar0_1" src="_wp_generated/wp1dfbd4d8.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_1',wp_menubar0,'wp_menubar0_buying-a-new-home.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_1',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="new-home-news-information.htm" target="_self"><img alt="" id="wp_menubar0_2" src="_wp_generated/wpf909c91c.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_2',wp_menubar0,'wp_menubar0_new-home-news-information.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_2',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="information-for-moving-to-a-new-home.htm" target="_self"><img alt="" id="wp_menubar0_3" src="_wp_generated/wpcaae42bd.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_3',wp_menubar0,'wp_menubar0_information-for-moving-to-a-new-home.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_3',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="snagging-and-quality-issues-with-new-homes.htm" target="_self"><img alt="" id="wp_menubar0_4" src="_wp_generated/wp5f60d4f8.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_4',wp_menubar0,'wp_menubar0_snagging-and-quality-issues-with-new-homes.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_4',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="finding-a-brand-new-home.htm" target="_self"><img alt="" id="wp_menubar0_5" src="_wp_generated/wp299efc70.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_5',wp_menubar0,'wp_menubar0_finding-a-brand-new-home.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_5',wp_menubar0);" onload="OnLoadPngFix();"></a></a><a href="help-to-resolve-problems-and-defects.htm" target="_self"><img alt="" id="wp_menubar0_6" src="_wp_generated/wp025e0557.png" style="width:123px;height:38px;border:0" onmouseover="wp_MenuItemOver('wp_menubar0_6',wp_menubar0,'wp_menubar0_help-to-resolve-problems-and-defects.htm_1');" onmouseout="wp_MenuItemOut('wp_menubar0_6',wp_menubar0);" onload="OnLoadPngFix();"></a></a>

You doubled up on the closing anchor tags in your menu here.

 

>    <a href="http://www.brand-newhomes.co.uk/forum/smf/index.php" target="_self"><img alt="" id="wp_menubar1_0" src="_wp_generated/wpb4741134.png" style="width:116px;height:32px;border:0" onmouseover="wp_MenuItemOver('wp_menubar1_0',wp_menubar1,null);" onmouseout="wp_MenuItemOut('wp_menubar1_0',wp_menubar1);" onload="OnLoadPngFix();"></a></a>

You doubled up on closing anchor tag here too.

 

><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f4f50fd5c44fa68" rel="nofollow"></script>

Take out rel="nofollow". The script tag does not have a rel attribute. http://www.w3schools.com/tags/tag_script.asp

 

>696.<iframe id="agg_4" name="agg_4" src="http://serifwebresources.com/rss/render.php?titlefamily=Verdana&headlinefamily=Verdana&summaryfamily=Verdana&titlesize=10.000000&headlinesize=10.000000&summarysize=10.000000&titlecolor=000000&headlinecolor=0000ff&summarycolor=000000&titlestyle=0&headlinestyle=0&summarystyle=0&src=http://www.brand-newhomes.co.uk/forum/smf/index.php?type=rss;action=.xml" allowtransparency="true" style="width:426px; height:339px;" frameborder="0"></iframe>

Ignore this one for now. Validator does not get these are variables being passed by the script fetching the feed. The programmer should have used

>&

for the ampersands. You could fix that part of this but the calls for the font and stuff are non standard.

 

This:

><style type="text/css">
@import url(//www.google.co.uk/cse/api/branding.css);
</style>

Belongs in the head section. You are also missing the http: part of the link.

 

These are done in XHTML. Take out space and /.

><input type="hidden" name="cx" value="partner-pub-4571298410938758:4h6x5hz0gy2" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="45" />
<input type="submit" name="sa" value="Search this site" />

 

><div class="cse-branding-logo">
<img src="//www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
</div>
Missing the http: part of image url. And take out the space and / at end of image tag.  This is the XHTML version.

Ignore the Google Plus error.  Apparently Google thinks they can create coding even though they are members of the W3C HTML Group.  

[code]<img alt="" src="_wp_generated/wpc5ad59f6.gif" width="468" height="60" border="0" id="agif15" name="agif15" alt="wpc5ad59f6.gif"></div>

Here you have 2 alt attributes for the image.

 

ID "TXT_788" already defined

Means you have two ids with the same name. You can only have an id name once on a page. Change the name of one of them.

 

><a href="http://www.morethan.com/Pages/Products/Home/HomeHomepage.aspx" ><img src="http://www.brand-newhomes.co.uk/More Than.gif" style="border:0;" alt="home insurance uk – More Than 2312101"/></a>

Take out the space an / in the image tag.

 

Fix those and see where we stand after that.

Share this post


Link to post
Share on other sites

OK

I've had a go.

The menu on its own is at Link Removed

I would really like this as a style sheet once it is sorted.

I still cannot see where in this code the hidden links are.

Returns 27 errors!

 

1) Your code - document.write("<large><font color='0000FF' face='Verdana'><b>"+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+"</b></font></large>") -

is still returning an error.

 

2)"Lonesome stuff" makes the menu work. I deleted it and the menu went too.

 

44 errors on Home Page now a few less and a few new ones!

Share this post


Link to post
Share on other sites

After wasting quite some time trying to fix the errors I have found that using:

http://validator.w3.org/ I can check the "Clean up Markup with HTML-Tidy" under the optins section and below you get the html code of your page minus the errors!

 

All you then do is save it to Desktop as "thenameofyourpage" (my home page was "index.htm" - dont bother with the full url)

Then using an FTP transfer program just drag it across to the section that contains all the e Html files.

 

Then do a re validate in the program and hey presto all the erors are gone!

 

Warning: If you re load the page using your webmaster software unless you can update the html file in that, you will need to do this process each time the page is re uploaded using the software as the same errors will replace the error free page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×