Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 11-05-2011, 09:52 AM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
2 errors on validation, please help

Validation Output: 2 Errors :

Line 540, Column 27: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment…


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

Line 541, Column 108: document type does not allow element "link" here…"text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" />



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

( Below is the code )
HTML Code:
<h3 align="left">What's Up?</h3> <p><!-- begin htmlcommentbox.com --> <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...</div> <link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" /> <script type="text/javascript" language="javascript" id="hcb"> /*<!--*/ if(!window.hcb_user){hcb_user={ };} (function(){s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((window.hcb_user && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&mod=%241%24wq1rdBcg%24B/LBxi.ULncYXG/aJ8poG."+"&opts=31&num=10");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script> <!-- end htmlcommentbox.com --></p> </div> </div> </div> <div class="box_btm"></div> </div> </div> <div class="clear"></div>

Last edited by snakeair; 11-05-2011 at 09:59 AM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 11-05-2011, 11:01 AM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
You can't have this in the body of the document, it belongs in the head section
HTML Code:
<link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" />
You have a lonesome <p> tag after this:
HTML Code:
<h3 align="left">What's Up?</h3>
Put a set of paragraph tags around this:
HTML Code:
<a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...
The end tag for the lonesome opening paragraph tag is here:
HTML Code:
<!-- end htmlcommentbox.com --></p>
This section is kind of a mess (but that could be because it is out of context)
HTML Code:
</div> </div> </div> <div class="box_btm"></div></div> </div>
 
Reply With Quote
  #3  
Old 11-05-2011, 11:19 AM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
Sorry but i'm a newbie when it comes to this. Does this mean that I have to move the comment box from it's present location on the page? What do you mean it's out of context and what may I do to correct this. I really appreciate the reply. I'm trying but this coding is kicking my butt. Thanks so much.
 
Reply With Quote
  #4  
Old 11-05-2011, 11:33 AM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
Move this line:
HTML Code:
<link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" />
Up between the <head> and </head> tags.

The part I said looked like a mess: You could have copied and pasted more than what was required to demonstrate your problem.

Do you have this online somewhere where we can see it in context?
 
Reply With Quote
  #5  
Old 11-05-2011, 11:35 AM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
yes it online at http://www.studio105recording.com

Down to one error

Validation Output: 1 Error
Line 540, Column 27: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment…



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



Thanks so much for the help

Last edited by mrcountry; 11-05-2011 at 11:41 AM.
 
Reply With Quote
  #6  
Old 11-05-2011, 11:38 AM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
As soon as I opened the page I got this image.



Seems there is a bigger problem than validating.

Give me a bit to look at the coding.
Attached Thumbnails
Click image for larger version

Name:	mrcountry.gif
Views:	174
Size:	5.5 KB
ID:	15336  
 
Reply With Quote
  #7  
Old 11-05-2011, 11:43 AM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
Wow, not what I needed to hear. Thanks so much for your help with this.
 
Reply With Quote
  #8  
Old 11-05-2011, 11:46 AM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
Oh by the way. The window is popping up when the internet explorer compatibly view is on. If I turn it off I dont get that, nor do I get it in chrome. I just didn't know if this matters or not. Im just trying to tell you what I have figured out. Thanks
 
Reply With Quote
  #9  
Old 11-05-2011, 01:47 PM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
I just wanted to say that I have it worked out, but i would appreciate you looking over the code at your convience to let me know what you think
 
Reply With Quote
  #10  
Old 11-05-2011, 03:15 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
That's great but I still get the message about the comments as above in IE8.
 
Reply With Quote
  #11  
Old 11-05-2011, 04:10 PM
mrcountry mrcountry is offline
Contributing Member
 
Join Date: 03-02-08
Posts: 88
iTrader: 0 / 0%
well thats not good, do you have any idea of how to correct it
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Errors in Blogspot Blog sakshamthaker Coding Forum 4 06-12-2010 01:13 PM
Does Google Penalize CSS Validation Errors? WM-Scott SEO Forum 6 12-30-2008 04:19 PM
Bookmarkify Plug-in's w3c Validation errors DaHLiA Coding Forum 4 04-16-2008 02:43 PM
W3C Validation Errors Ryan_m Coding Forum 6 04-14-2008 06:51 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:46 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC