Dreamweaver's Clean Up HTML Tools - dummies

By David Karlins, Doug Sahlin

Another helpful set of tools for checking code are the Clean Up HTML tools. These tools are available from the Command menu. Choosing Command→Clean Up HTML opens the Clean Up HTML/XHTML dialog box, which displays a set of common errors. Selecting any (or all) of those errors and clicking OK prompts Dreamweaver to automatically correct those errors and display a results dialog box that lists all the corrections made.

The following figure shows the results with one empty tag removed.


The Clean Up Word HTML (accessed by choosing Command→Clean Up Word HTML) is similar to the Clean Up HTML command but it has special tools to detect and eliminate nonstandard and redundant (that is, unnecessary) HTML generated when you paste Word text into Dreamweaver.

There are many check box options for what to test for, but by default all are checked, and you should leave them checked to let Dreamweaver detect all nonstandard and redundant Word HTML. Doing this does not remove content or formatting, it just removes tags that don’t do anything and that add to file size.

The following figure shows the results of cleaning up a paragraph of text copied from Word into Dreamweaver.