TIDY(1) TIDY(1)
NAME
tidy - validate, correct, and pretty-print HTML files
SYNOPSIStidy[option...][file...][option...][file...]DESCRIPTION
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.
OPTIONSProcessingdirectives-indentor-i to indent element content
-omit to omit optional end tags
-wrap<column> to wrap text at the specified <column> (default is 68)
-upperor-u to force tags to upper case (default is lower case)
-cleanor-c to replace FONT, NOBR and CENTER tags by CSS
-bareor-b to strip out smart quotes and em dashes, etc.
-numericor-n to output numeric rather than named entities
-errorsor-e to only show errors
-quietor-q to suppress nonessential output
-xml to specify the input is well formed XML
-asxml to convert HTML to well formed XHTML
-asxhtml to convert HTML to well formed XHTML
-ashtml to force XHTML to well formed HTML
-access<level>
to do additional accessibility checks (<level> = 1, 2, 3)
Characterencodings-raw to output values above 127 without conversion to entities
-ascii to use US-ASCII for output, ISO-8859-1 for input
-latin1 to use ISO-8859-1 for both input and output
-iso2022 to use ISO-2022 for both input and output
-utf8 to use UTF-8 for both input and output
-mac to use MacRoman for input, US-ASCII for output
-utf16le to use UTF-16LE for both input and output
-utf16be to use UTF-16BE for both input and output
-utf16 to use UTF-16 for both input and output
-win1252 to use Windows-1252 for input, US-ASCII for output
-big5 to use Big5 for both input and output
-shiftjis to use Shift_JIS for both input and output
-language<lang>
to set the two-letter language code <lang> (for future use)
Filemanipulation-outputor-o<file>
to write output to the specified <file>
-f<file> to write errors to the specified <file>
-config<file> to set configuration options from the specified <file>
-modifyor-m to modify the original input files
Miscellaneous-versionor-v to show the version of Tidy
-help,-hor-?
to list the command line options
-help-config to list all configuration options
-show-config to list the current configuration settings
USAGE
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.
ENVIRONMENTHTML_TIDY 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.
EXITSTATUS
0 All input files were processed successfully.
1 There were warnings.
2 There were errors.
SEEALSO
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.htmlAUTHORS
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 TIDY(1)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors

Report errors in the content of this documentation with the feedback links below.

Bug reports

Report bugs in the functionality of the described tool or API through Bug Reporter.

Formatting problems

Report formatting mistakes in the online version of these pages with the feedback links below.