The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> HTML Programming
|
End tag for "div" omitted, but OMITTAG NO was specified.
Discuss End tag for "div" omitted, but OMITTAG NO was specified. in the HTML Programming forum on Dev Shed. End tag for "div" omitted, but OMITTAG NO was specified. HTML Programming forum covering discussions of HTML and XHTML, as well as HTML-related issues such as writing W3C Compliant code. Use HyperText Markup Language for building websites.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 16th, 2008, 03:54 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 5
Time spent in forums: 36 m 29 sec
Reputation Power: 0
|
|
End tag for "div" omitted, but OMITTAG NO was specified.
I am clueless as to how to fix this. Can someone help me figure this one out?
the Validator error:
Line 128, 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 ">".
Here is an info from the validator following the error:
Line 22, Column 0: start tag was here.
<div id="container">
But looking at my code, there is no error?!
I am also using a PHP include to pull html in from a menu.php (this file only has the menu code, no header, body, html tags).
When I do the tidy html, it wants me to cut n paste the menu.php code in to the entire page, I dont want to do that but i want my code to be valid.
Please help!
Thanks in advance!
|

December 16th, 2008, 04:30 PM
|
 |
|<.+#f@#+.&.|
|
|
Join Date: Mar 2002
Location: norway
|
|
|
We need to see some code if we are going to help.
Either post a link or parse the html in a post,
or do as the validator suggest check if every div element is closed properly.
__________________
|

December 16th, 2008, 04:45 PM
|
 |
Contributing User
|
|
Join Date: Mar 2003
Location: Michigan, USA
|
|
Quote: | Originally Posted by vmethod
Here is an info from the validator following the error:
Line 22, Column 0: start tag was here.
<div id="container">
Thanks in advance! |
You didn't close the div with a </div> or you closed another tag before closing this one like this:
Code:
<p><span>text</p></span>
The above is a no-no, you need to close the span before closing the paragraph
|

December 16th, 2008, 04:57 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 5
Time spent in forums: 36 m 29 sec
Reputation Power: 0
|
|
|
it worked out...
i went through it and tracked all my <div></div> which was odd because each <div> was closed with </div> but for sh**s and giggles, i added another </div> at the very end and wouldn't you know...
thanks! even though i'm still a little confused lol.
|

September 18th, 2012, 12:56 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: San Antonio, TX USA
Posts: 6
Time spent in forums: 2 h 35 m 10 sec
Reputation Power: 0
|
|
|
end tag for "div" omitted, but OMITTAG NO was specified
I too have the same problem. Tried adding extra closing div tag. Just created more errors. So I started removing closing div from the bottom up and got 2 errors saying exactly the opposite thing for the same line that contains only 1 closing div tag!
line 285 end tag for "div" omitted ...
line 285 end tag for "div" which is not open ...
go figure.
|

September 18th, 2012, 04:45 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
Welcome to DevShed Forums, RodmanB.
To quote Akh's post above...
Quote: | Originally Posted by Akh We need to see some code if we are going to help.
Either post a link or parse the html in a post,
or do as the validator suggest check if every div element is closed properly. |
New users are restricted from posting URLs until they have made 5 posts. You may need to get around this by leaving out the "http://" and putting a space before each ".". Yes this rule is annoying, but the administrators say it's necessary for limiting spam.
P.S. Next time please start your own thread instead of reviving a very old thread.
|

September 18th, 2012, 05:30 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: San Antonio, TX USA
Posts: 6
Time spent in forums: 2 h 35 m 10 sec
Reputation Power: 0
|
|
|
code link
OK, sorry for any violations I may have committed. It was more a comment and less a request for an answer. I've already spent 15+ years building and debugging websites and can live with a minor anomaly. However, if you want to see the source, it's at crowderradiator. Sometime fresh eyes will catch something I may have inadvertently overlooked.
Thank for the reply
|

September 18th, 2012, 06:04 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
|
The HTML Validator extension for Firefox indicates that a space is missing between the href and title attributes of the first link on that page.
Using the count sub-feature of the search feature in my text editor, I see that the number of <div> start and end tags is not equal. This is a case though where the validator isn't very good at pinpointing where the error is. By looking at the DOM structure, using Firefox's Firebug extension, I see that the end tag for the "headMast" <div> is missing.
By the way, the hspace, vspace, border, and align attributes for <img> elements are obsolete. For the first two, CSS margins should be used instead. For the third, CSS border properties should be used. The fourth is a little trickier to replace with CSS because it depends on which value is used.
|

September 18th, 2012, 07:54 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: San Antonio, TX USA
Posts: 6
Time spent in forums: 2 h 35 m 10 sec
Reputation Power: 0
|
|
|
Old School - goes back to school
Quote: | Originally Posted by Kravvitz The HTML Validator extension for Firefox indicates that a space is missing between the href and title attributes of the first link on that page.
Using the count sub-feature of the search feature in my text editor, I see that the number of <div> start and end tags is not equal. This is a case though where the validator isn't very good at pinpointing where the error is. By looking at the DOM structure, using Firefox's Firebug extension, I see that the end tag for the "headMast" <div> is missing.
By the way, the hspace, vspace, border, and align attributes for <img> elements are obsolete. For the first two, CSS margins should be used instead. For the third, CSS border properties should be used. The fourth is a little trickier to replace with CSS because it depends on which value is used. |
***FIXED***
It was actually the "corral" div that was missing.
I found it by cleaning up the code indents and aligning the opening and closing tags. Maybe 'old school' but it's easier than trying to figure what the 'Validator' was trying to say.
As for the obsolete elements well, I guess I should clean up my code snippets. Unfortunately, production schedules sometimes forces us to recycle obsolete code. As soon I get time I'll take your suggestions. In fact, I probably should be doing that instead of this.
Thanks
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|