Below are some examples of how to use HTB.
The content of HTML files can vary wildly, and the default behavior may not always be the best. Experiment with several options first. The options "-as", "-ams", and "-n" have given good results also.
Modern browsers are amazingly forgiving of poorly written HTML. HTB will usually report the line number and text of offending tags and ignores them in the re-formatting process. Occasionally with quoting inconsistencies, HTB will stop re-formatting at the point the problem was found.
This reporting mechanism makes HTB useful as a simple syntax validator, even if the generated output is not saved. HTB does not attempt to correct invalid files and in most cases still does a good job of re-formatting.
If syntax correction is needed, try Tidy from W3C which is a very good cleanup program. Tidy may even be used in combination with HTB using command-line piping and the HTB -f option. A companion command file, "runhtb.bat" for Windows NT/2000/XP allows conversion of multiple files directly from a Desktop icon.