A bit more information would be helpful.
Under what circumstances are you trying to find ill-formatted HTML tags?
I ask because one case that occurs to me is a situation where you are building or proof-reading raw html on a local machine. If so, using the w3c validator will be easy, free and produce up-to-date results.
Using Perl to use the w3c validator will be more complex (in that case), but it's doable. Write your script to
- read your html file into local memory
- connect to w3c, send the html page (won't work if merely a fragment, IIRC) to the validator (it accepts a URI, file upload or direct input (cut'n'paste), and capture the return (with one of the usual suspects - search the Monastery for 'web scraping' for one set of ideas).
- display the returned errors, warnings, or 'good to go' message for the user or spit'em out to dead trees or whatever.
At a minimum, you can expect standard-based validation this way; Tidy has it's own (configurable within limits) set of notions about valid .html and, as noted above, HTML::Validator may have some outdated notions.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|