Karakas Online

3.10. HTML tidy

When editing HTML it's easy to make mistakes. Wouldn't it be nice if there was a simple way to fix these mistakes automatically and tidy up sloppy editing into nicely layed out markup? Well now there is! Dave Raggett's HTML TIDY is a free utility for doing just that. It also works great on the atrociously hard to read markup generated by specialized HTML editors and conversion tools (like the ones we will be using), and can help you identify where you need to pay further attention on making your pages more accessible to people with disabilities (see Chapter 9).

Tidy is able to fix up a wide range of problems (which is very good if you are trying to produce valid HTML, as described in Chapter 8) and to bring to your attention things that you need to work on yourself. Each item found is listed with the line number and column so that you can see where the problem lies in your markup. Tidy won't generate a cleaned up version when there are problems that it can't be sure of how to handle. These are logged as "errors" rather than "warnings".

See htmltidy for more details. We call htmltidy from within the lyxtox script (see Section 7.1.4.6 for the details). Download it and install it somewhere in your path.

Last updated Mon Sep 24 01:19:25 CEST 2007 Permalink: http://www.karakas-online.de/mySGML/html-tidy.html All contents © 2002-2007 Chris Karakas