Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- tool to check for missing end tags in html
December 8, 2008, 7:03 am
rate this thread
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
Re: tool to check for missing end tags in html
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.
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