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.
15 -indent or -i to indent element content
15 -omit to omit optional end tags
15 -wrap <column> to wrap text at the specified <column> (default is 68)
15 -upper or -u to force tags to upper case (default is lower case)
15 -clean or -c to replace FONT, NOBR and CENTER tags by CSS
15 -bare or -b to strip out smart quotes and em dashes, etc.
15 -numeric or -n to output numeric rather than named entities
15 -errors or -e to only show errors
15 -quiet or -q to suppress nonessential output
15 -xml to specify the input is well formed XML
15 -asxml to convert HTML to well formed XHTML
15 -asxhtml to convert HTML to well formed XHTML
15 -ashtml to force XHTML to well formed HTML
15 -access \<level\> to do additional accessibility checks (\<level\> = 1, 2, 3)
15 Character encodings
15 -raw to output values above 127 without conversion to entities
15 -ascii to use US-ASCII for output, ISO-8859-1 for input
15 -latin1 to use ISO-8859-1 for both input and output
15 -iso2022 to use ISO-2022 for both input and output
15 -utf8 to use UTF-8 for both input and output
15 -mac to use MacRoman for input, US-ASCII for output
15 -utf16le to use UTF-16LE for both input and output
15 -utf16be to use UTF-16BE for both input and output
15 -utf16 to use UTF-16 for both input and output
15 -win1252 to use Windows-1252 for input, US-ASCII for output
15 -big5 to use Big5 for both input and output
15 -shiftjis to use Shift_JIS for both input and output
15 -language \<lang\> to set the two-letter language code <lang> (for future use)
15 File manipulation
15 -output or -o <file> to write output to the specified <file>
15 -f <file> to write errors to the specified <file>
15 -config <file> to set configuration options from the specified <file>
15 -modify or -m to modify the original input files
15 Miscellaneous
15 -version or -v to show the version of Tidy
15 -help, -h or -? to list the command line options
15 -help-config to list all configuration options
15 -show-config 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.
15 HTML_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 .
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.