Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man1/tidy.1
Real path: /usr/share/man/man1/tidy.1
Zurück
'\" te .\" tidy man page for the HTML Tidy .TH TIDY 1 "5.4.0" "HTML Tidy" "5.4.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 without the starting dashes. They are listed in the second part of this section. .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 <%s>\fR, \fB-o <%s>\fR (\fIoutput-file: <%s>\fR) write output to the specified <file> .TP \fB-config <%s>\fR set configuration options from the specified <file> .TP \fB-file <%s>\fR, \fB-f <%s>\fR (\fIerror-file: <%s>\fR) write errors and warnings to the specified <file> .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 <%s>\fR, \fB-w <%s>\fR (\fIwrap: <%s>\fR) wrap text at the specified <column>. 0 is assumed if <column> 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 <%s>\fR (\fIaccessibility-check: <%s>\fR) do additional accessibility checks (<level> = 0, 1, 2, 3). 0 is assumed if <level> 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-show-config\fR list the current configuration settings .TP \fB-help-option <%s>\fR show a description of the <option> .TP \fB-language <%s>\fR (\fIlanguage: <%s>\fR) set Tidy's output language to <lang>. Specify '-language help' for more help. Use before output-causing arguments to ensure the language takes effect, e.g.,`tidy -lang es -lang help`. .SS XML .TP \fB-xml-help\fR list the command line options in XML format .TP \fB-xml-config\fR list all configuration options in XML format .TP \fB-xml-strings\fR output all of Tidy's strings in XML format .TP \fB-xml-error-strings\fR output error constants and strings in XML format .TP \fB-xml-options-strings\fR output option descriptions in XML format .LP \fIConfiguration\fR options can be specified by preceding each option with \fB--\fR at the command line, followed by its desired value, OR by placing the options and values in a configuration file, and telling tidy to read that file with the \fB-config\fR option: .LP .in 1i \fBtidy --\fR\fIoption1 \fRvalue1 \fB--\fIoption2 \fRvalue2 ... .br \fBtidy -config \fIconfig-file \fR ... .LP \fIConfiguration\fR options can be conveniently grouped in a single config file. A Tidy configuration file is simply a text file, where each option is listed on a separate line in the form .LP .in 1i \fIoption1\fR: \fIvalue1\fR .br \fIoption2\fR: \fIvalue2\fR .br etc. .LP The permissible values for a given option depend on the option's Type. There are five Types: \fIBoolean\fR, \fIAutoBool\fR, \fIDocType\fR, \fIEnum\fR, and \fIString\fR. \fIBoolean\fR Types allow any of \fByes/no, y/n, true/false, t/f, 1/0\fR. \fIAutoBool\fRs allow \fBauto\fR in addition to the values allowed by \fIBooleans\fR. \fIInteger\fR Types take non-negative integers. \fIString\fR Types generally have no defaults, and you should provide them in non-quoted form (unless you wish the output to contain the literal quotes). .LP \fIEnum\fR, \fIEncoding\fR, and \fIDocType\fR Types have a fixed repertoire of items, which are listed in the \fISupported values\fR sections below. .LP You only need to provide options and values for those whose defaults you wish to override, although you may wish to include some already-defaulted options and values for the sake of documentation and explicitness. .LP Here is a sample config file, with at least one example of each of the five Types: .LP \fI// sample Tidy configuration options output-xhtml: yes add-xml-decl: no doctype: strict char-encoding: ascii indent: auto wrap: 76 repeated-attributes: keep-last error-file: errs.txt \fR .LP Below is a summary and brief description of each of the options. They are listed alphabetically within each category. .SS HTML, XHTML, XML options .rs .TP \fB--add-xml-decl\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. .sp 1 Note that if the input already includes an \fI<?xml ... ?>\fR declaration then this option will be ignored. .sp 1 If the encoding for the output is different from \fBascii\fR, one of the \fButf*\fR encodings, or \fBraw\fR, then the declaration is always added as required by the XML standard. See also: \fB--char-encoding\fR, \fB--output-encoding\fR .TP \fB--add-xml-space\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should add \fIxml:space="preserve"\fR to elements such as \fI<pre>\fR, \fI<style>\fR and \fI<script>\fR when generating XML. .sp 1 This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD. .TP \fB--alt-text\fR \fIString\fR .br This option specifies the default \fIalt=\fR text Tidy uses for \fI<img>\fR attributes when the \fIalt=\fR attribute is missing. .sp 1 Use with care, as it is your responsibility to make your documents accessible to people who cannot see the images. .TP \fB--anchor-as-name\fR \fIBoolean\fR (\fByes\fR if unset) .br This option controls the deletion or addition of the \fIname\fR attribute in elements where it can serve as anchor. .sp 1 If set to \fByes\fR a \fIname\fR attribute, if not already existing, is added along an existing \fIid\fR attribute if the DTD allows it. .sp 1 If set to \fBno\fR any existing name attribute is removed if an \fIid\fR attribute exists or has been added. .TP \fB--assume-xml-procins\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should change the parsing of processing instructions to require \fI?>\fR as the terminator rather than \fI>\fR. .sp 1 This option is automatically set if the input is in XML. .TP \fB--bare\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, and output spaces rather than non-breaking spaces where they exist in the input. .TP \fB--clean\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should perform cleaning of some legacy presentational tags (currently \fI<i>\fR, \fI<b>\fR, \fI<center>\fR when enclosed within appropriate inline tags, and \fI<font>\fR). If set to \fByes\fR then legacy tags will be replaced with CSS \fI<style>\fR tags and structural markup as appropriate. .TP \fB--coerce-endtags\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should coerce a start tag into an end tag in cases where it looks like an end tag was probably intended; for example, given .sp 1 \fI<span>foo <b>bar<b> baz</span>\fR .sp 1 Tidy will output .sp 1 \fI<span>foo <b>bar</b> baz</span>\fR .TP \fB--css-prefix\fR \fIString\fR .br This option specifies the prefix that Tidy uses for styles rules. .sp 1 By default, \fBc\fR will be used. .TP \fB--decorate-inferred-ul\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should decorate inferred \fI<ul>\fR elements with some CSS markup to avoid indentation to the right. .TP \fB--doctype\fR \fIDocType\fR (\fBauto\fR if unset) .br Supported values: \fBhtml5, omit, auto, strict, transitional, user\fR This option specifies the DOCTYPE declaration generated by Tidy. .sp 1 If set to \fBomit\fR the output won't contain a DOCTYPE declaration. Note this this also implies \fInumeric-entities\fR is set to \fByes\fR. .sp 1 If set to \fBhtml5\fR the DOCTYPE is set to \fI<!DOCTYPE html>\fR. .sp 1 If set to \fBauto\fR (the default) Tidy will use an educated guess based upon the contents of the document. .sp 1 If set to \fBstrict\fR, Tidy will set the DOCTYPE to the HTML4 or XHTML1 strict DTD. .sp 1 If set to \fBloose\fR, the DOCTYPE is set to the HTML4 or XHTML1 loose (transitional) DTD. .sp 1 Alternatively, you can supply a string for the formal public identifier (FPI). .sp 1 For example: .sp 1 \fIdoctype: "-//ACME//DTD HTML 3.14159//EN"\fR .sp 1 If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy leaves the DOCTYPE for generic XML documents unchanged. .sp 1 This option does not offer a validation of document conformance. .TP \fB--drop-empty-elements\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should discard empty elements. .TP \fB--drop-empty-paras\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should discard empty paragraphs. .TP \fB--drop-font-tags\fR \fIBoolean\fR (\fBno\fR if unset) .br Deprecated; \fIdo not use\fR. This option is destructive to \fI<font>\fR tags, and it will be removed from future versions of Tidy. Use the \fIclean\fR option instead. .sp 1 If you do set this option despite the warning it will perform as \fIclean\fR except styles will be inline instead of put into a CSS class. \fI<font>\fR tags will be dropped completely and their styles will not be preserved. .sp 1 If both \fIclean\fR and this option are enabled, \fI<font>\fR tags will still be dropped completely, and other styles will be preserved in a CSS class instead of inline. .sp 1 See \fIclean\fR for more information. .TP \fB--drop-proprietary-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should strip out proprietary attributes, such as Microsoft data binding attributes. Additionally attributes that aren't permitted in the output version of HTML will be dropped if used with \fIstrict-tags-attributes\fR. .TP \fB--enclose-block-text\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should insert a \fI<p>\fR element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict. .TP \fB--enclose-text\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should enclose any text it finds in the body element within a \fI<p>\fR element. .sp 1 This is useful when you want to take existing HTML and use it with a style sheet. .TP \fB--escape-cdata\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should convert \fI<![CDATA[]]>\fR sections to normal text. .TP \fB--fix-backslash\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should replace backslash characters \fI\\\fR in URLs with forward slashes \fI/\fR. .TP \fB--fix-bad-comments\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should replace unexpected hyphens with \fI=\fR characters when it comes across adjacent hyphens. .sp 1 The default is \fByes\fR. .sp 1 This option is provided for users of Cold Fusion which uses the comment syntax: \fI<!--- --->\fR. .TP \fB--fix-uri\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should check attribute values that carry URIs for illegal characters and if such are found, escape them as HTML4 recommends. .TP \fB--gdoc\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should enable specific behavior for cleaning up HTML exported from Google Docs. .TP \fB--hide-comments\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should print out comments. .TP \fB--hide-endtags\fR \fIBoolean\fR (\fBno\fR if unset) .br This option is an alias for \fIomit-optional-tags\fR. .TP \fB--indent-cdata\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should indent \fI<![CDATA[]]>\fR sections. .TP \fB--input-xml\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser. .TP \fB--join-classes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should combine class names to generate a single, new class name if multiple class assignments are detected on an element. .TP \fB--join-styles\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should combine styles to generate a single, new style if multiple style values are detected on an element. .TP \fB--literal-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies how Tidy deals with whitespace characters within attribute values. .sp 1 If the value is \fBno\fR Tidy normalizes attribute values by replacing any newline or tab with a single space, and further by replacing any contiguous whitespace with a single space. .sp 1 To force Tidy to preserve the original, literal values of all attributes and ensure that whitespace within attribute values is passed through unchanged, set this option to \fByes\fR. .TP \fB--logical-emphasis\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should replace any occurrence of \fI<i>\fR with \fI<em>\fR and any occurrence of \fI<b>\fR with \fI<strong>\fR. Any attributes are preserved unchanged. .sp 1 This option can be set independently of the \fIclean\fR option. .TP \fB--lower-literals\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should convert the value of an attribute that takes a list of predefined values to lower case. .sp 1 This is required for XHTML documents. .TP \fB--merge-divs\fR \fIAutoBool\fR (\fBauto\fR if unset) .br This option can be used to modify the behavior of \fIclean\fR when set to \fByes\fR. .sp 1 This option specifies if Tidy should merge nested \fI<div>\fR such as \fI<div><div>...</div></div>\fR. .sp 1 If set to \fBauto\fR the attributes of the inner \fI<div>\fR are moved to the outer one. Nested \fI<div>\fR with \fIid\fR attributes are \fInot\fR merged. .sp 1 If set to \fByes\fR the attributes of the inner \fI<div>\fR are discarded with the exception of \fIclass\fR and \fIstyle\fR. See also: \fB--clean\fR, \fB--merge-spans\fR .TP \fB--merge-emphasis\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should merge nested \fI<b>\fR and \fI<i>\fR elements; for example, for the case .sp 1 \fI<b class="rtop-2">foo <b class="r2-2">bar</b> baz</b>\fR, .sp 1 Tidy will output \fI<b class="rtop-2">foo bar baz</b>\fR. .TP \fB--merge-spans\fR \fIAutoBool\fR (\fBauto\fR if unset) .br This option can be used to modify the behavior of \fIclean\fR when set to \fByes\fR. .sp 1 This option specifies if Tidy should merge nested \fI<span>\fR such as \fI<span><span>...</span></span>\fR. .sp 1 The algorithm is identical to the one used by \fImerge-divs\fR. See also: \fB--clean\fR, \fB--merge-divs\fR .TP \fB--ncr\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should allow numeric character references. .TP \fB--new-blocklevel-tags\fR \fITag names\fR .br This option specifies new block-level tags. This option takes a space or comma separated list of tag names. .sp 1 Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. .sp 1 Note you can't change the content model for elements such as \fI<table>\fR, \fI<ul>\fR, \fI<ol>\fR and \fI<dl>\fR. .sp 1 This option is ignored in XML mode. See also: \fB--new-empty-tags\fR, \fB--new-inline-tags\fR, \fB--new-pre-tags\fR .TP \fB--new-empty-tags\fR \fITag names\fR .br This option specifies new empty inline tags. This option takes a space or comma separated list of tag names. .sp 1 Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. .sp 1 Remember to also declare empty tags as either inline or blocklevel. .sp 1 This option is ignored in XML mode. See also: \fB--new-blocklevel-tags\fR, \fB--new-inline-tags\fR, \fB--new-pre-tags\fR .TP \fB--new-inline-tags\fR \fITag names\fR .br This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. .sp 1 Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. .sp 1 This option is ignored in XML mode. See also: \fB--new-blocklevel-tags\fR, \fB--new-empty-tags\fR, \fB--new-pre-tags\fR .TP \fB--new-pre-tags\fR \fITag names\fR .br This option specifies new tags that are to be processed in exactly the same way as HTML's \fI<pre>\fR element. This option takes a space or comma separated list of tag names. .sp 1 Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. .sp 1 Note you cannot as yet add new CDATA elements. .sp 1 This option is ignored in XML mode. See also: \fB--new-blocklevel-tags\fR, \fB--new-empty-tags\fR, \fB--new-inline-tags\fR .TP \fB--numeric-entities\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output entities other than the built-in HTML entities (\fI&\fR, \fI<\fR, \fI>\fR, and \fI"\fR) in the numeric rather than the named entity form. .sp 1 Only entities compatible with the DOCTYPE declaration generated are used. .sp 1 Entities that can be represented in the output encoding are translated correspondingly. See also: \fB--doctype\fR, \fB--preserve-entities\fR .TP \fB--omit-optional-tags\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should omit optional start tags and end tags when generating output. .sp 1 Setting this option causes all tags for the \fI<html>\fR, \fI<head>\fR, and \fI<body>\fR elements to be omitted from output, as well as such end tags as \fI</p>\fR, \fI</li>\fR, \fI</dt>\fR, \fI</dd>\fR, \fI</option>\fR, \fI</tr>\fR, \fI</td>\fR, and \fI</th>\fR. .sp 1 This option is ignored for XML output. .TP \fB--output-html\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should generate pretty printed output, writing it as HTML. .TP \fB--output-xhtml\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML. .sp 1 This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML, and will use the corrected value in output regardless of other sources. .sp 1 For XHTML, entities can be written as named or numeric entities according to the setting of \fInumeric-entities\fR. .sp 1 The original case of tags and attributes will be preserved, regardless of other options. .TP \fB--output-xml\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should pretty print output, writing it as well-formed XML. .sp 1 Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsed by an XML parser. .sp 1 The original case of tags and attributes will be preserved, regardless of other options. .TP \fB--preserve-entities\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should preserve well-formed entities as found in the input. .TP \fB--quote-ampersand\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should output unadorned \fI&\fR characters as \fI&\fR. .TP \fB--quote-marks\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output \fI"\fR characters as \fI"\fR as is preferred by some editing environments. .sp 1 The apostrophe character \fI'\fR is written out as \fI'\fR since many web browsers don't yet support \fI'\fR. .TP \fB--quote-nbsp\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should output non-breaking space characters as entities, rather than as the Unicode character value 160 (decimal). .TP \fB--repeated-attributes\fR \fIenum\fR (\fBkeep-last\fR if unset) .br Supported values: \fBkeep-first, keep-last\fR This option specifies if Tidy should keep the first or last attribute, if an attribute is repeated, e.g. has two \fIalign\fR attributes. See also: \fB--join-classes\fR, \fB--join-styles\fR .TP \fB--replace-color\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should replace numeric values in color attributes with HTML/XHTML color names where defined, e.g. replace \fI#ffffff\fR with \fIwhite\fR. .TP \fB--show-body-only\fR \fIAutoBool\fR (\fBno\fR if unset) .br This option specifies if Tidy should print only the contents of the body tag as an HTML fragment. .sp 1 If set to \fBauto\fR, this is performed only if the body tag has been inferred. .sp 1 Useful for incorporating existing whole pages as a portion of another page. .sp 1 This option has no effect if XML output is requested. .TP \fB--skip-nested\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies that Tidy should skip nested tags when parsing script and style data. .TP \fB--strict-tags-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This options ensures that tags and attributes are applicable for the version of HTML that Tidy outputs. When set to \fByes\fR (the default) and the output document type is a strict doctype, then Tidy will report errors. If the output document type is a loose or transitional doctype, then Tidy will report warnings. .sp 1 Additionally if \fIdrop-proprietary-attributes\fR is enabled, then not applicable attributes will be dropped, too. .sp 1 When set to \fBno\fR, these checks are not performed. .TP \fB--uppercase-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output attribute names in upper case. .sp 1 The default is \fBno\fR, which results in lower case attribute names, except for XML input, where the original case is preserved. .TP \fB--uppercase-tags\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output tag names in upper case. .sp 1 The default is \fBno\fR which results in lower case tag names, except for XML input where the original case is preserved. .TP \fB--word-2000\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should go to great pains to strip out all the surplus stuff Microsoft Word 2000 inserts when you save Word documents as "Web pages". It doesn't handle embedded images or VML. .sp 1 You should consider using Word's "Save As: Web Page, Filtered". .SS Diagnostics options .rs .TP \fB--accessibility-check\fR \fIenum\fR (\fB0 (Tidy Classic)\fR if unset) .br Supported values: \fB0 (Tidy Classic), 1 (Priority 1 Checks), 2 (Priority 2 Checks), 3 (Priority 3 Checks)\fR This option specifies what level of accessibility checking, if any, that Tidy should perform. .sp 1 Level \fB0 (Tidy Classic)\fR is equivalent to Tidy Classic's accessibility checking. .sp 1 For more information on Tidy's accessibility checking, visit Tidy's Accessibility Page at \fIhttp://www.html-tidy.org/accessibility/\fR. .TP \fB--show-errors\fR \fIInteger\fR (\fB6\fR if unset) .br This option specifies the number Tidy uses to determine if further errors should be shown. If set to \fB0\fR, then no errors are shown. .TP \fB--show-info\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should display info-level messages. .TP \fB--show-warnings\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings. .SS Pretty Print options .rs .TP \fB--break-before-br\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output a line break before each \fI<br>\fR element. .TP \fB--escape-scripts\fR \fIBoolean\fR (\fByes\fR if unset) .br This option causes items that look like closing tags, like \fI</g\fR to be escaped to \fI<\\/g\fR. Set this option to 'no' if you do not want this. .TP \fB--indent\fR \fIAutoBool\fR (\fBno\fR if unset) .br This option specifies if Tidy should indent block-level tags. .sp 1 If set to \fBauto\fR Tidy will decide whether or not to indent the content of tags such as \fI<title>\fR, \fI<h1>\fR-\fI<h6>\fR, \fI<li>\fR, \fI<td>\fR, or \fI<p>\fR based on the content including a block-level element. .sp 1 Setting \fIindent\fR to \fByes\fR can expose layout bugs in some browsers. .sp 1 Use the option \fIindent-spaces\fR to control the number of spaces or tabs output per level of indent, and \fIindent-with-tabs\fR to specify whether spaces or tabs are used. See also: \fB--indent-spaces\fR .TP \fB--indent-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should begin each attribute on a new line. .TP \fB--indent-spaces\fR \fIInteger\fR (\fB2\fR if unset) .br This option specifies the number of spaces or tabs that Tidy uses to indent content when \fIindent\fR is enabled. .sp 1 Note that the default value for this option is dependent upon the value of \fIindent-with-tabs\fR (see also). See also: \fB--indent\fR .TP \fB--indent-with-tabs\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should indent with tabs instead of spaces, assuming \fIindent\fR is \fByes\fR. .sp 1 Set it to \fByes\fR to indent using tabs instead of the default spaces. .sp 1 Use the option \fIindent-spaces\fR to control the number of tabs output per level of indent. Note that when \fIindent-with-tabs\fR is enabled the default value of \fIindent-spaces\fR is reset to \fB1\fR. .sp 1 Note \fItab-size\fR controls converting input tabs to spaces. Set it to zero to retain input tabs. .TP \fB--markup\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidy won't generate a pretty printed version if it finds significant errors (see \fIforce-output\fR). .TP \fB--punctuation-wrap\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should line wrap after some Unicode or Chinese punctuation characters. .TP \fB--sort-attributes\fR \fIenum\fR (\fBnone\fR if unset) .br Supported values: \fBnone, alpha\fR This option specifies that Tidy should sort attributes within an element using the specified sort algorithm. If set to \fBalpha\fR, the algorithm is an ascending alphabetic sort. .TP \fB--split\fR \fIBoolean\fR (\fBno\fR if unset) .br This option has no function and is deprecated. .TP \fB--tab-size\fR \fIInteger\fR (\fB8\fR if unset) .br This option specifies the number of columns that Tidy uses between successive tab stops. It is used to map tabs to spaces when reading the input. .TP \fB--vertical-space\fR \fIAutoBool\fR (\fBno\fR if unset) .br This option specifies if Tidy should add some extra empty lines for readability. .sp 1 The default is \fBno\fR. .sp 1 If set to \fBauto\fR Tidy will eliminate nearly all newline characters. .TP \fB--wrap\fR \fIInteger\fR (\fB68\fR if unset) .br This option specifies the right margin Tidy uses for line wrapping. .sp 1 Tidy tries to wrap lines so that they do not exceed this length. .sp 1 Set \fIwrap\fR to \fB0\fR(zero) if you want to disable line wrapping. .TP \fB--wrap-asp\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should line wrap text contained within ASP pseudo elements, which look like: \fI<% ... %>\fR. .TP \fB--wrap-attributes\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should line-wrap attribute values, meaning that if the value of an attribute causes a line to exceed the width specified by \fIwrap\fR, Tidy will add one or more line breaks to the value, causing it to be wrapped into multiple lines. .sp 1 Note that this option can be set independently of \fIwrap-script-literals\fR. By default Tidy replaces any newline or tab with a single space and replaces any sequences of whitespace with a single space. .sp 1 To force Tidy to preserve the original, literal values of all attributes, and ensure that whitespace characters within attribute values are passed through unchanged, set \fIliteral-attributes\fR to \fByes\fR. See also: \fB--wrap-script-literals\fR, \fB--literal-attributes\fR .TP \fB--wrap-jste\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should line wrap text contained within JSTE pseudo elements, which look like: \fI<# ... #>\fR. .TP \fB--wrap-php\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should line wrap text contained within PHP pseudo elements, which look like: \fI<?php ... ?>\fR. .TP \fB--wrap-script-literals\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should line wrap string literals that appear in script attributes. .sp 1 Tidy wraps long script string literals by inserting a backslash character before the line break. See also: \fB--wrap-attributes\fR .TP \fB--wrap-sections\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should line wrap text contained within \fI<![ ... ]>\fR section tags. .SS Character Encoding options .rs .TP \fB--ascii-chars\fR \fIBoolean\fR (\fBno\fR if unset) .br Can be used to modify behavior of the \fIclean\fR option when set to \fByes\fR. .sp 1 If set to \fByes\fR when using \fIclean\fR, \fI&emdash;\fR, \fI”\fR, and other named character entities are downgraded to their closest ASCII equivalents. See also: \fB--clean\fR .TP \fB--char-encoding\fR \fIEncoding\fR (\fButf8\fR if unset) .br Supported values: \fBraw, ascii, latin0, latin1, utf8, iso2022, mac, win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis\fR This option specifies the character encoding Tidy uses for both the input and output. .sp 1 For \fBascii\fR Tidy will accept Latin-1 (ISO-8859-1) character values, but will use entities for all characters whose value >127. .sp 1 For \fBraw\fR, Tidy will output values above 127 without translating them into entities. .sp 1 For \fBlatin1\fR, characters above 255 will be written as entities. .sp 1 For \fButf8\fR, Tidy assumes that both input and output are encoded as UTF-8. .sp 1 You can use \fBiso2022\fR for files encoded using the ISO-2022 family of encodings e.g. ISO-2022-JP. .sp 1 For \fBmac\fR and \fBwin1252\fR, Tidy will accept vendor specific character values, but will use entities for all characters whose value >127. .sp 1 For unsupported encodings, use an external utility to convert to and from UTF-8. See also: \fB--input-encoding\fR, \fB--output-encoding\fR .TP \fB--input-encoding\fR \fIEncoding\fR (\fButf8\fR if unset) .br Supported values: \fBraw, ascii, latin0, latin1, utf8, iso2022, mac, win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis\fR This option specifies the character encoding Tidy uses for the input. See \fIchar-encoding\fR for more info. See also: \fB--char-encoding\fR .TP \fB--language\fR \fIString\fR .br Currently not used, but this option specifies the language Tidy would use if it were properly localized. For example: \fBen\fR. .TP \fB--newline\fR \fIenum\fR (\fBPlatform dependent\fR if unset) .br Supported values: \fBLF, CRLF, CR\fR The default is appropriate to the current platform. .sp 1 Genrally CRLF on PC-DOS, Windows and OS/2; CR on Classic Mac OS; and LF everywhere else (Linux, Mac OS X, and Unix). .TP \fB--output-bom\fR \fIAutoBool\fR (\fBauto\fR if unset) .br This option specifies if Tidy should write a Unicode Byte Order Mark character (BOM; also known as Zero Width No-Break Space; has value of U+FEFF) to the beginning of the output, and only applies to UTF-8 and UTF-16 output encodings. .sp 1 If set to \fBauto\fR this option causes Tidy to write a BOM to the output only if a BOM was present at the beginning of the input. .sp 1 A BOM is always written for XML/XHTML output using UTF-16 output encodings. .TP \fB--output-encoding\fR \fIEncoding\fR (\fButf8\fR if unset) .br Supported values: \fBraw, ascii, latin0, latin1, utf8, iso2022, mac, win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis\fR This option specifies the character encoding Tidy uses for the output. .sp 1 Note that this may only be different from \fIinput-encoding\fR for Latin encodings (\fBascii\fR, \fBlatin0\fR, \fBlatin1\fR, \fBmac\fR, \fBwin1252\fR, \fBibm858\fR). .sp 1 See \fIchar-encoding\fR for more information See also: \fB--char-encoding\fR .SS Miscellaneous options .rs .TP \fB--error-file\fR \fIString\fR .br This option specifies the error file Tidy uses for errors and warnings. Normally errors and warnings are output to \fIstderr\fR. See also: \fB--output-file\fR .TP \fB--force-output\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should produce output even if errors are encountered. .sp 1 Use this option with care; if Tidy reports an error, this means Tidy was not able to (or is not sure how to) fix the error, so the resulting output may not reflect your intention. .TP \fB--gnu-emacs\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should change the format for reporting errors and warnings to a format that is more easily parsed by GNU Emacs. .TP \fB--gnu-emacs-file\fR \fIString\fR .br Used internally. .TP \fB--keep-time\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should keep the original modification time of files that Tidy modifies in place. .sp 1 Setting the option to \fByes\fR allows you to tidy files without changing the file modification date, which may be useful with certain tools that use the modification date for things such as automatic server deployment. .sp 1 Note this feature is not supported on some platforms. .TP \fB--output-file\fR \fIString\fR .br This option specifies the output file Tidy uses for markup. Normally markup is written to \fIstdout\fR. See also: \fB--error-file\fR .TP \fB--quiet\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should output the summary of the numbers of errors and warnings, or the welcome or informational messages. .TP \fB--slide-style\fR \fIString\fR .br This option has no function and is deprecated. .TP \fB--tidy-mark\fR \fIBoolean\fR (\fByes\fR if unset) .br This option specifies if Tidy should add a \fImeta\fR element to the document head to indicate that the document has been tidied. .sp 1 Tidy won't add a meta element if one is already present. .TP \fB--write-back\fR \fIBoolean\fR (\fBno\fR if unset) .br This option specifies if Tidy should write back the tidied markup to the same file it read from. .sp 1 You are advised to keep copies of important files before tidying them, as on rare occasions the result may not be what you expect. .SH ENVIRONMENT .TP .B HTML_TIDY Name of the default configuration file. This should be an absolute path, since you will probably invoke \fBtidy\fR from different directories. The value of HTML_TIDY will be parsed after the compiled-in default (defined with -DTIDY_CONFIG_FILE), but before any of the files specified using \fB-config\fR. .SH "EXIT STATUS" .IP 0 All input files were processed successfully. .IP 1 There were warnings. .IP 2 There were errors. .\" Oracle has added the ARC stability level to this manual page .SH ATTRIBUTES See .BR attributes (7) for descriptions of the following attributes: .sp .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability text/tidy = Stability Uncommitted .TE .PP .SH SEE ALSO For more information about HTML Tidy: .RS 4 .LP http://www.html-tidy.org/ .RE .LP For more information on HTML: .RS 4 .LP \fBHTML: Edition for Web Authors\fR (the latest HTML specification) .br http://dev.w3.org/html5/spec-author-view .LP \fBHTML: The Markup Language\fR (an HTML language reference) .br http://dev.w3.org/html5/markup/ .RE .LP For bug reports and comments: .RS 4 .LP https://github.com/htacg/tidy-html5/issues/ .RE .LP Or send questions and comments to \fBpublic-htacg@w3.org\fR. .LP Validate your HTML documents using the \fBW3C Nu Markup Validator\fR: .RS 4 .LP http://validator.w3.org/nu/ .RE .SH AUTHOR \fBTidy\fR was written by \fBDave Raggett\fR <dsr@w3.org>, and subsequently maintained by a team at http://tidy.sourceforge.net/, and now maintained by \fBHTACG\fR (http://www.htacg.org). .LP The sources for \fBHTML Tidy\fR are available at https://github.com/htacg/tidy-html5/ under the MIT Licence. .SH NOTES .\" Oracle has added source availability information to this manual page Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source-code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from https://github.com/htacg/tidy-html5/archive/5.4.0.tar.gz. Further information about this software can be found on the open source community website at http://www.html-tidy.org/.