TIDY(1) General Commands Manual TIDY(1)

tidy - validate, correct, and pretty-print HTML files

tidy [option ...] [file ...] [option ...] [file ...]

Tidy reads HTML, XHTML and XML files and writes cleaned up markup. For HTML varians, it detects and corrects many common coding errors and strives to produce visually equivalent markup that is both W3C complaint and works on most browsers. A common use of Tidy is to convert plain HTML to XHTML. For generic XML files, Tidy is limited to correcting basic well-formedness errors and pretty printing.

If no markup file is specified, Tidy reads the standard input. If no output file is specified, Tidy writes markup to the standard output. If no error file is specified, Tidy writes messages to the standard error.

Processing directives

to indent element content
to omit optional end tags
to wrap text at the specified <column> (default is 68)
to force tags to upper case (default is lower case)
to replace FONT, NOBR and CENTER tags by CSS
to strip out smart quotes and em dashes, etc.
to output numeric rather than named entities
to only show errors
to suppress nonessential output
to specify the input is well formed XML
to convert HTML to well formed XHTML
to convert HTML to well formed XHTML
to force XHTML to well formed HTML
to do additional accessibility checks (<level> = 1, 2, 3)
to output values above 127 without conversion to entities
to use US-ASCII for output, ISO-8859-1 for input
to use ISO-8859-1 for both input and output
to use ISO-2022 for both input and output
to use UTF-8 for both input and output
to use MacRoman for input, US-ASCII for output
to use UTF-16LE for both input and output
to use UTF-16BE for both input and output
to use UTF-16 for both input and output
to use Windows-1252 for input, US-ASCII for output
to use Big5 for both input and output
to use Shift_JIS for both input and output
to set the two-letter language code <lang> (for future use)
to write output to the specified <file>
to write errors to the specified <file>
to set configuration options from the specified <file>
to modify the original input files
to show the version of Tidy
to list the command line options
to list all configuration options
to list the current configuration settings

Use --blah blarg for any configuration option "blah" with argument "blarg"

Input/Output default to stdin/stdout respectively Single letter options apart from -f and -o may be combined as in: tidy -f errs.txt -imu foo.html For further info on HTML see http://www.w3.org/MarkUp

For more information about HTML Tidy, visit the project home page at http://tidy.sourceforge.net. Here, you will find links to documentation, mailing lists (with searchable archives) and links to report bugs.

Name of the default configuration file. This should be an absolute path, since you will probably invoke tidy from different directories. The value of HTML_TIDY will be parsed after the compiled-in default (defined with -DCONFIG_FILE), but before any of the files specified using -config.

0
All input files were processed successfully.
1
There were warnings.
2
There were errors.

HTML Tidy Project Page at http://tidy.sourceforge.net

Dave Raggett's Tidy Overview at http://www.w3.org/People/Raggett/tidy/

Tidy Quick Reference at http://tidy.sourceforge.net/docs/quickref.html

For information about TidyLib, see http://tidy.sourceforge.net/libintro.html

Dave Raggett <dsr@w3.org>.

Terry Teague <terry_teague@users.sourceforge.net>.

Bjoern Hoehrmann <bjoern@hoehrmann.de>

Charles Reitzel <creitzel@rcn.com>

This manual page was written by Matej Vela <vela@debian.org> and updated by Charles Reitzel.

December 1, 2002