tool to check for missing end tags in html

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I tend to write html as if it were xhtml in the sense that the only
thing I should need to do is change the declaration, add the namespace
attribute to the html element, and close empty tags like hr. However, I
just realized that the tool I was using to validate (nsgmls) obviously
won't notify me when I miss, e.g., a close to an LI in nested lists.
When I looked into options to make it do so, I would think that 'nsgmls
-s -wunclosed' (or at least -wall) would warn about this, but it

A search of the web turned up nothing useful and one of this newsgroup
turned up nothing at all so I must not have been using a good collection
of terms, but I did try.

Anyone know how to make nsgmls do this or, failing that, is there any
handy CLI tool for Linux that will do it. I fiddled with xmllint and
tidy (and their various options), too. (Tidy can silently correct it but
won't warn about it and I don't want tidy rewriting everything.) If they
could be made to do it, that'd be great. If not, I guess something else
might do.


Re: tool to check for missing end tags in html

slakmagik wrote:

Quoted text here. Click to load it

That's not all. The content models of script and style elements are
different, in a rather nasty way. However, you can avoid this problem by not
using any content in such elements, i.e. making all scripts and stylesheets
either external or embedded into attributes.

Quoted text here. Click to load it

You can simply create a modified version of the DTD for the HTML version you
are using. You need to make rather trivial changes to a handful of
declarations. See


Re: tool to check for missing end tags in html

On 2008-12-08 Mon 13:41:16, Jukka K. Korpela wrote:
Quoted text here. Click to load it

Thank you, both, Jukka and Lars. Looks like that's my best bet and that
looks like a very nice page.

Site Timeline