Navigation:  Tools >

HTML Tidy Tool (tick_24Pro, tick_24Std, cross_24Lite)

Previous pageReturn to chapter overviewNext page

The HTML Tidy Tool uses HTML Tidy to do some or all of the following (New v7.00):

Format ("pretty print") documents
Automatically fix certain mistakes and problems
Change documents to/from HTML and XHTML

vistahtmltidyv804

HTML Tidy is able to fix a wide range of problems and to bring to your attention things that you need to work on yourself. Note that HTML Tidy won't generate a cleaned-up/fixed version when there are problems that it can't be sure of how to handle. HTML Tidy logs such problems as "errors" rather than "warnings".

This help document describes the HTML Tidy Tool Dialog Box. To access this tool from the editor, choose the Tools->Format and Fix HTML (with dialog) menu item or press the HTML Tidy Tool button on the Main Toolbar.

Also see the Format and Fix HTML Automatically topic that gives steps on how to use the HTML Tidy Tool to format and fix a document.

(tick_16Pro, cross_16Std, cross_16Lite) With the professional edition, the Batch Wizard can be used to easily process multiple files with the HTML Tidy Tool.

NOTE: It is possible that HTML Tidy may make changes that you do not want or that are incorrect. Be sure to keep backup copies of the original documents. It is possible that you may need to revert back to the original documents or to reference them for some reason after HTML Tidy has made changes to them.

NOTE: HTML Tidy is not developed or maintained by AI Internet Solutions. Any bugs or feature enhancements to HTML Tidy should be sent to the maintainers of HTML Tidy (see the links at the bottom of this page). AI Internet Solutions only provides an interface to HTML Tidy. Therefore, only bugs or problems with the HTML Tidy interface (but not the HTML Tidy program itself) should be reported to AI Internet Solutions.

NOTE: HTML Tidy's error and warning messages are different than CSE HTML Validator's error and warning messages. Do not try to equate the message output of the two different programs as each will have significantly different message output.

Tabs

Fixed HTML - Shows a source view of HTML Tidy's output after formatting and fixing the source document (if no errors).
Original - Shows the source of the original document that was used as the input to HTML Tidy.
Tidy Messages - Shows HTML Tidy's messages from the last operation. These include any warning and error messages.
Browser View (Fixed) - Shows HTML Tidy's output rendered in a web browser. Use this to check the output results for problems.
Browser View (Original) - Shows the original source rendered in a web browser. Use this to compare it to the rendered view of HTML Tidy's output in the Browser View (Fixed) tab.

Options

Profile - Choose an HTML Tidy profile as the basis for configuring HTML Tidy. You can create your own profiles. This allows for a high degree of customization because HTML Tidy's command line parameters can be specifically specified in each profile.
Use below options - Check this option to combine the currently selected profile with the options displayed below. The options displayed below will override the same options in the profile if this option is checked. This option is enabled by default.
Indent element content - Check this option to indent block-level tags. To set the amount of the indent, specify the number of spaces HTML Tidy will use to indent content in the following edit box. This option is enabled by default, with the default indent being 2 spaces.
Wrap at characters - Set this to specify the right margin that HTML Tidy uses for line wrapping. Use 0 (zero) for no line wrapping. The default is 68 characters.
Force output to - Set this option to force output to HTML or XHTML. This is useful when changing documents, such as from HTML to XHTML.
Doctype - Set this set the DOCTYPE declaration used by HTML Tidy. If set to "omit", then the output won't contain a DOCTYPE declaration. If set to "auto" (the default), then HTML Tidy will use an educated guess based upon the contents of the document. If set to "strict", then HTML Tidy will set the DOCTYPE to the strict DTD. If set to "loose", then the DOCTYPE is set to the loose (transitional) DTD. The default is "auto".
Enable CSE Validator results - Check this box to show the number of errors and warnings generated by CSE HTML Validator for the original document and for the HTML Tidy document. When the HTML Tidy output is refreshed, then the validation is rerun for the HTML Tidy document. This is a good way to test the output of HTML Tidy to see how much it helped. To see the actual errors and warning messages, the document must be viewed in the editor and validated as normal.

More Options

Add Tidy Meta Generator Tag - Set this option if you want HTML Tidy to add a meta generator tag to the head section of the document if one is not already present. This option is not enabled by default.
Attributes in Uppercase - Set this option if you want HTML Tidy to output attributes in uppercase. Note that the original case is preserved for XML/XHTML input. This option is not enabled by default.
Hide Comments - Set this option if you want HTML Tidy to hide HTML comments in the output. This option is not enabled by default.
Logical Emphasis - Set this option if you want HTML Tidy to replace the "i" tags with "em" and the "b" tags with "strong". Attributes will be preserved. This option is not enabled by default.
Tags in Uppercase - Set this option if you want HTML Tidy to output tag names in uppercase. Note that the original case is preserved for XML/XHTML input. This option is not enabled by default.

More Options->Diagnostics Options

Show Warnings - Set this option if you want HTML Tidy to show warnings. Disabling this option can be useful when a few errors are hidden in many warnings. This option is enabled by default. (New v7.01)

Buttons

Refresh - Press this button to rerun HTML Tidy with the currently selected options. The Fixed HTML tab will be refreshed with the new output.
OK - Press this button to accept HTML Tidy's output and close the dialog box.
Cancel - Press this button to reject HTML Tidy's output and close the dialog box.

Tips

When setting up and debugging HTML Tidy's options and profiles, it may be useful to use the Options->View Last Tidy Command Line menu option to see exactly how the HTML Tidy executable is being called.
It should be possible to update HTML Tidy simply by replacing the tidy.exe file with a newer version of HTML Tidy, If you do this, then be sure to backup the old tidy.exe file in case there are problems with the updated file. Newer versions of HTML Tidy may be available from HTML Tidy's Home Page.

HTML Tidy Links