.\" tidy man page for the HTML Tidy .TH TIDY 1 "5.6.0" "HTML Tidy" "5.6.0" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH NAME \fBtidy\fR - check, correct, and pretty-print HTML(5) files .SH SYNOPSIS \fBtidy\fR [\fIoptions\fR] [\fIfile\fR ...] [\fIoptions\fR] [\fIfile\fR ...] ... .SH DESCRIPTION Tidy reads HTML, XHTML, and XML files and writes cleaned-up markup. For HTML variants, it detects, reports, and corrects many common coding errors and strives to produce visually equivalent markup that is both conformant to the HTML specifications and that works in most browsers. .LP 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. .LP If no input file is specified, Tidy reads the standard input. If no output file is specified, Tidy writes the tidied markup to the standard output. If no error file is specified, Tidy writes messages to the standard error. .SH OPTIONS Tidy supports two different kinds of options. Purely \fIcommand-line\fR options, starting with a single dash '\fB-\fR', can only be used on the command-line, not in configuration files. They are listed in the first part of this section. \fIConfiguration\fR options, on the other hand, can either be passed on the command line, starting with two dashes \fB--\fR, or specified in a configuration file, using the option name, followed by a colon \fB:\fR, plus the value, without the starting dashes. They are listed in the second part of this section, with a sample config file. .LP For \fIcommand-line\fR options that expect a numerical argument, a default is assumed if no meaningful value can be found. On the other hand, \fIconfiguration\fR options cannot be used without a value; a \fIconfiguration\fR option without a value is simply discarded and reported as an error. .LP Using a \fIcommand-line\fR option is sometimes equivalent to setting the value of a \fIconfiguration\fR option. The equivalent option and value are shown in parentheses in the list below, as they would appear in a configuration file. For example, \fB-quiet, -q\fR (\fIquiet: yes\fR) means that using the \fIcommand-line\fR option \fB-quiet\fR or \fB-q\fR is equivalent to setting the \fIconfiguration\fR option \fIquiet\fR to \fIyes\fR. .LP Single-letter \fIcommand-line\fR options without an associated value can be combined; for example '\fB-i\fR', '\fB-m\fR' and '\fB-u\fR' may be combined as '\fB-imu\fR'. .SS File manipulation .TP \fB-output \fR, \fB-o \fR (\fIoutput-file: \fR) write output to the specified .TP \fB-config \fR set configuration options from the specified .TP \fB-file \fR, \fB-f \fR (\fIerror-file: \fR) write errors and warnings to the specified .TP \fB-modify\fR, \fB-m\fR (\fIwrite-back: yes\fR) modify the original input files .SS Processing directives .TP \fB-indent\fR, \fB-i\fR (\fIindent: auto\fR) indent element content .TP \fB-wrap \fR, \fB-w \fR (\fIwrap: \fR) wrap text at the specified . 0 is assumed if is missing. When this option is omitted, the default of the configuration option 'wrap' applies. .TP \fB-upper\fR, \fB-u\fR (\fIuppercase-tags: yes\fR) force tags to upper case .TP \fB-clean\fR, \fB-c\fR (\fIclean: yes\fR) replace FONT, NOBR and CENTER tags with CSS .TP \fB-bare\fR, \fB-b\fR (\fIbare: yes\fR) strip out smart quotes and em dashes, etc. .TP \fB-gdoc\fR, \fB-g\fR (\fIgdoc: yes\fR) produce clean version of html exported by Google Docs .TP \fB-numeric\fR, \fB-n\fR (\fInumeric-entities: yes\fR) output numeric rather than named entities .TP \fB-errors\fR, \fB-e\fR (\fImarkup: no\fR) show only errors and warnings .TP \fB-quiet\fR, \fB-q\fR (\fIquiet: yes\fR) suppress nonessential output .TP \fB-omit\fR (\fIomit-optional-tags: yes\fR) omit optional start tags and end tags .TP \fB-xml\fR (\fIinput-xml: yes\fR) specify the input is well formed XML .TP \fB-asxml\fR, \fB-asxhtml\fR (\fIoutput-xhtml: yes\fR) convert HTML to well formed XHTML .TP \fB-ashtml\fR (\fIoutput-html: yes\fR) force XHTML to well formed HTML .TP \fB-access \fR (\fIaccessibility-check: \fR) do additional accessibility checks ( = 0, 1, 2, 3). 0 is assumed if is missing. .SS Character encodings .TP \fB-raw\fR output values above 127 without conversion to entities .TP \fB-ascii\fR use ISO-8859-1 for input, US-ASCII for output .TP \fB-latin0\fR use ISO-8859-15 for input, US-ASCII for output .TP \fB-latin1\fR use ISO-8859-1 for both input and output .TP \fB-iso2022\fR use ISO-2022 for both input and output .TP \fB-utf8\fR use UTF-8 for both input and output .TP \fB-mac\fR use MacRoman for input, US-ASCII for output .TP \fB-win1252\fR use Windows-1252 for input, US-ASCII for output .TP \fB-ibm858\fR use IBM-858 (CP850+Euro) for input, US-ASCII for output .TP \fB-utf16le\fR use UTF-16LE for both input and output .TP \fB-utf16be\fR use UTF-16BE for both input and output .TP \fB-utf16\fR use UTF-16 for both input and output .TP \fB-big5\fR use Big5 for both input and output .TP \fB-shiftjis\fR use Shift_JIS for both input and output .SS Miscellaneous .TP \fB-version\fR, \fB-v\fR show the version of Tidy .TP \fB-help\fR, \fB-h\fR, \fB-?\fR list the command line options .TP \fB-help-config\fR list all configuration options .TP \fB-help-env\fR show information about the environment and runtime configuration .TP \fB-show-config\fR list the current configuration settings .TP \fB-export-config\fR list the current configuration settings, suitable for a config file .TP \fB-export-default-config\fR list the default configuration settings, suitable for a config file .TP \fB-help-option