Some things tidy can automatically fix
Missing or mismatched end tags
<h1>heading
<h2>subheading</h2>
... is automatically fixed:
<h1>heading</h1>
<h2>subheading</h2>
End tags provided in the wrong order
If you like this talk, <i>then
you should <b>check out</i> my book</b>!
... is automatically fixed:
If you like this talk, <i>then you should <b>check out</b> my book!</i>!
Confused
tags
<h1><hr>heading</h1>
<h2>sub<hr>heading</h2>
... is automatically fixed:
<hr>
<h1>heading</h1>
<h2>sub</h2>
<hr>
<h2>heading</h2>