Finding "unclosed element"

How do you find unclosed elements.  I'm trying to clean up code, but when I look at the source in Firefox,  the close body tag reports the following error:
End tag for "body" seen, but there were unclosed elements

This occurs on even simple pages.  I understand what the message means but how do I go about finding the "unclosed element"?  Is there an easier way to look at the source to find this error?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Do a view source and copy the content.
Go to an HTML Formatter service (Example: and format the HTML
Paste into an editor and save as .html (so you can get the code formatting)

No go through the code to see where you have a missing div

What I do is eliminate blocks I know are correct - so when I have an opening <ul> - when I find the closing </ul> I remove the <ul> entirely. This slowly reduces the size of the haystack.
Chris StanyonWebDevCommented:
I would suggest you consider using an IDE or advanced text editor that would highlight this kind of thing automatically. I use Sublime Text with a plugin, and it will highlight is an end tag is missing - works well for HTML / CSS / JS / PHP etc.
Julian HansenCommented:
Just a note that the editor can show you it is missing - but to find where it is supposed to go can take a bit of searching.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Chris StanyonWebDevCommented:
@Julian - Yep :)

I think that's probably why I'm slightly OCD about indentation !
breeze351Author Commented:
I tried what you suggested, but no joy!  I'm attaching the html text.  It's not that big.  Maybe you can see what I'm missing.

I do the same thing.  Even with if statements in php.  I actually start the if statement on one line on the next line I put the "{" under the "if".  Then on the 3rd line I indent the code.  When I'm done with the if statement, the "}" aligns under the opening "{".  I know it's not what is considered correct coding, but it sure makes it easier for me to read and find errors .  I can't tell you how may times I just typed to fast and instead of "{", I typed "[" or the same on the closing brackets.
Chris StanyonWebDevCommented:
Hey breeze,

Don't see anything fundamentally wrong with your page. Firefox is not showing any errors in the source view, and apart from a couple of deprecated properties it validates as HTML perfectly OK.

The width on <table> and align on your Submit button should be replaced with CSS.

You're missing quotes around the class name on your first <td>

<td style="padding-left:5px" class = Body_Labels>User ID: </td>

But they're trivial issues.

Do you have any plugins enable in Firefox that injects additional code into your pages - sometimes adblockers or webdev tools can do that.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian HansenCommented:
I get the same results as Chris - no validation errors - code seems semantically correct.
breeze351Author Commented:
I swear to you that yesterday the </body> in the source view in Firefox said that there were open elements!
I haven't been drinking that much (Well maybe I have).
breeze351Author Commented:
I swear to you that yesterday the </body> in the source view in Firefox was in read and  said that there were open elements!
I haven't been drinking that much (Well maybe I have).
Julian HansenCommented:
Cache maybe?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.