<span id="span_1">
<table>
<tr><td>Test</td></tr>
</table>
<span id="span_2">
</span>
</span>
Then HTML Tidy rendered the output as follows:
<span id="span_1">
</span>
<table>
<tr>
<td>Test</td>
</tr>
</table>
<span id="span_1">
<span id="span_2">
</span>
</span>
Duplicating the
<span> tag might look like an error, but in fact the only sensible way to fix the illegal nesting is to close the
<span> before the table, and then reopen it again afterwards. HTML Tidy's diagnostics, sent to NETTidy's output panel, explain what it's done:
TidyWarning: (6, 1): missing </span> before <table>
TidyWarning: (10, 4): inserting implicit <span>
Despite such minor problems, in the final assessment, HTML Tidy is a powerful API for parsing, altering, and formatting HTML, and it continues to be developed and refined. As you've seen, it's easy to incorporate it into your .NET projectsand it's worth downloading and using for its diagnostics alone. NETTidy leverages only a little of its power; there's a lot still left there under the hood, so I encourage you to use it as a springboard for further development in your own projects.