4
4
# tidy - validate, correct, and pretty-print HTML files
8
# If set to yes (the default) Tidy will add a meta element to the
9
# document head to indicate that the document has been tidied. To
10
# suppress this, set tidy-mark to no. Tidy won't add a meta element
11
# if one is already present.
14
# Determines whether Tidy generates a pretty printed version of the
15
# markup. Bool values are either yes or no. Note that Tidy won't
16
# generate a pretty printed version if it finds unknown tags, or
17
# missing trailing quotes on attribute values, or missing trailing '>' on
18
# tags. The default is yes.
21
# Sets the right margin for line wrapping. Tidy tries to wrap lines so
22
# that they do not exceed this length. The default is 66. Set wrap to
23
# zero if you want to disable line wrapping.
25
# wrap-attributes: bool
26
# If set to yes, attribute values may be wrapped across lines for
27
# easier editing. The default is no. This option can be set
28
# independently of wrap-scriptlets
30
# wrap-script-literals: bool
31
# If set to yes, this allows lines to be wrapped within string literals
32
# that appear in script attributes. The default is no. The example
33
# shows how Tidy wraps a really really long script string literal
34
# inserting a backslash character before the linebreak:
36
# <a href="somewhere.html" onmouseover="document.status = '...some \
37
# really, really, really, really, really, really, really, really, \
38
# really, really long string..';">test</a>
41
# wrap within <![ ... ]> section tags. The default is yes.
44
# If set to no, this prevents lines from being wrapped within ASP
45
# pseudo elements, which look like: <% ... %>. The default is yes.
48
# If set to no, this prevents lines from being wrapped within JSTE
49
# pseudo elements, which look like: <# ... #>. The default is yes.
52
# If set to no, this prevents lines from being wrapped within PHP
53
# pseudo elements. The default is yes.
55
# literal-attributes: bool
56
# If set to yes, this ensures that whitespace characters within
57
# attribute values are passed through unchanged. The default is no.
60
# Sets the number of columns between successive tab stops. The
61
# default is 4. It is used to map tabs to spaces when reading files.
62
# Tidy never outputs files with tabs.
64
# indent: no, yes or auto
65
# If set to yes, Tidy will indent block-level tags. The default is no. If
66
# set to auto Tidy will decide whether or not to indent the content of
67
# tags such as title, h1-h6, li, td, th, or p depending on whether or
68
# not the content includes a block-level element. You are advised
69
# to avoid setting indent to yes as this can expose layout bugs in
72
# indent-spaces: number
73
# Sets the number of spaces to indent content when indentation is
74
# enabled. The default is 2 spaces.
76
# indent-attributes: bool
77
# If set to yes, each attribute will begin on a new line. The default is
81
# If set to yes, optional end-tags will be omitted when generating
82
# the pretty printed markup. This option is ignored if you are
83
# outputting to XML. The default is no.
86
# If set to yes, Tidy will use the XML parser rather than the error
87
# correcting HTML parser. The default is no.
90
# If set to yes, Tidy will use generate the pretty printed output
91
# writing it as well-formed XML. Any entities not defined in XML 1.0
92
# will be written as numeric entities to allow them to be parsed by
93
# an XML parser. The tags and attributes will be in the case used in
94
# the input document, regardless of other options. The default is no.
98
# If set to yes, Tidy will add the XML declatation when outputting
99
# XML or XHTML. The default is no. Note that if the input
100
# document includes an <?xml?> declaration then it will appear in
101
# the output independent of the value of this option.
104
# If set to yes, Tidy will generate the pretty printed output writing it
105
# as extensible HTML. The default is no. This option causes Tidy to
106
# set the doctype and default namespace as appropriate to
107
# XHTML. If a doctype or namespace is given they will checked for
108
# consistency with the content of the document. In the case of an
109
# inconsistency, the corrected values will appear in the output. For
110
# XHTML, entities can be written as named or numeric entities
111
# according to the value of the "numeric-entities" property. The tags
112
# and attributes will be output in the case used in the input
113
# document, regardless of other options.
115
# doctype: omit, auto, strict, loose or <fpi>
116
# This property controls the doctype declaration generated by Tidy.
117
# If set to omit the output file won't contain a doctype declaration. If
118
# set to auto (the default) Tidy will use an educated guess based
119
# upon the contents of the document. If set to strict, Tidy will set the
120
# doctype to the strict DTD. If set to loose, the doctype is set to the
121
# loose (transitional) DTD. Alternatively, you can supply a string for
122
# the formal public identifier (fpi) for example:
124
# doctype: "-//ACME//DTD HTML 3.14159//EN"
126
# If you specify the fpi for an XHTML document, Tidy will set the
127
# system identifier to the empty string. Tidy leaves the document
128
# type for generic XML documents unchanged.
130
# char-encoding: raw, ascii, latin1, utf8 or iso2022
131
# Determines how Tidy interprets character streams. For ascii, Tidy
132
# will accept Latin-1 character values, but will use entities for all
133
# characters whose value > 127. For raw, Tidy will output values
134
# above 127 without translating them into entities. For latin1
135
# characters above 255 will be written as entities. For utf8, Tidy
136
# assumes that both input and output is encoded as UTF-8. You
137
# can use iso2022 for files encoded using the ISO2022 family of
138
# encodings e.g. ISO 2022-JP. The default is ascii.
140
# numeric-entities: bool
141
# Causes entities other than the basic XML 1.0 named entities to be
142
# written in the numeric rather than the named entity form. The
146
# If set to yes, this causes " characters to be written out as "
147
# as is preferred by some editing environments. The apostrophe
148
# character ' is written out as ' since many web browsers don't
149
# yet support '. The default is no.
152
# If set to yes, this causes non-breaking space characters to be
153
# written out as entities, rather than as the Unicode character value
154
# 160 (decimal). The default is yes.
156
# quote-ampersand: bool
157
# If set to yes, this causes unadorned & characters to be written out
158
# as &. The default is yes.
160
# assume-xml-procins: bool
161
# If set to yes, this changes the parsing of processing instructions to
162
# require ?> as the terminator rather than >. The default is no. This
163
# option is automatically set if the input is in XML.
166
# avoid mapping values > 127 to entities. The default is no.
168
# fix-backslash: bool
169
# If set to yes, this causes backslash characters "\" in URLs to be
170
# replaced by forward slashes "/". The default is yes.
172
# break-before-br: bool
173
# If set to yes, Tidy will output a line break before each <br>
174
# element. The default is no.
176
# uppercase-tags: bool
177
# Causes tag names to be output in upper case. The default is no
178
# resulting in lowercase, except for XML input where the original
181
# uppercase-attributes: bool
182
# If set to yes attribute names are output in upper case. The default
183
# is no resulting in lowercase, except for XML where the original
187
# If set to yes, Tidy will go to great pains to strip out all the surplus
188
# stuff Microsoft Word 2000 inserts when you save Word
189
# documents as "Web pages". The default is no. Note that Tidy
190
# doesn't yet know what to do with VML markup from Word, but in
191
# future I hope to be able to map VML to SVG.
193
# Microsoft has developed its own optional filter for exporting to
194
# HTML, and the 2.0 version is much improved. You can download
195
# the filter free from the Microsoft Office Update site.
198
# If set to yes, causes Tidy to strip out surplus presentational tags
199
# and attributes replacing them by style rules and structural markup
200
# as appropriate. It works well on the html saved from Microsoft
201
# Office'97. The default is no.
203
# logical-emphasis: bool
204
# If set to yes, causes Tidy to replace any occurrence of i by em
205
# and any occurrence of b by strong. In both cases, the attributes
206
# are preserved unchanged. The default is no. This option can now
207
# be set independently of the clean and drop-font-tags options.
209
# drop-empty-paras: bool
210
# If set to yes, empty paragraphs will be discarded. If set to no,
211
# empty paragraphs are replaced by a pair of br elements as
212
# HTML4 precludes empty paragraphs. The default is yes.
214
# drop-font-tags: bool
215
# If set to yes together with the clean option (see above), Tidy will
216
# discard font and center tags rather than creating the
217
# corresponding style rules. The default is no.
220
# If set to yes, this causes Tidy to enclose any text it finds in the
221
# body element within a p element. This is useful when you want to
222
# take an existing html file and use it with a style sheet. Any text at
223
# the body level will screw up the margins, but wrap the text within
224
# a p element and all is well! The default is no.
226
# enclose-block-text: bool
227
# If set to yes, this causes Tidy to insert a p element to enclose any
228
# text it finds in any element that allows mixed content for HTML
229
# transitional but not HTML strict. The default is no.
231
# fix-bad-comments: bool
232
# If set to yes, this causes Tidy to replace unexpected hyphens with
233
# "=" characters when it comes across adjacent hyphens. The
234
# default is yes. This option is provided for users of Cold Fusion
235
# which uses the comment syntax: <!--- --->
237
# add-xml-space: bool
238
# If set to yes, this causes Tidy to add xml:space="preserve" to
239
# elements such as pre, style and script when generating XML. This
240
# is needed if the whitespace in such elements is to be parsed
241
# appropriately without having access to the DTD. The default is
245
# This allows you to set the default alt text for img attributes. This
246
# feature is dangerous as it suppresses further accessibility
247
# warnings. YOU ARE RESPONSIBLE FOR MAKING YOUR
248
# DOCUMENTS ACCESSIBLE TO PEOPLE WHO CAN'T SEE
252
# If set to yes, Tidy will write back the tidied markup to the same file
253
# it read from. The default is no. You are advised to keep copies of
254
# important files before tidying them as on rare occasions the result
255
# may not always be what you expect.
258
# If set to yes, Tidy won't alter the last modified time for files it
259
# writes back to. The default is yes. This allows you to tidy files
260
# without effecting which ones will be uploaded to the Web server
261
# when using a tool such as 'SiteCopy'. Note that this feature may
262
# not work on some platforms.
264
# error-file: filename
265
# Writes errors and warnings to the named file rather than to stderr.
267
# show-warnings: bool
268
# If set to no, warnings are suppressed. This can be useful when a
269
# few errors are hidden in a flurry of warnings. The default is yes.
272
# If set to yes, Tidy won't output the welcome message or the
273
# summary of the numbers of errors and warnings. The default is
277
# If set to yes, Tidy changes the format for reporting errors and
278
# warnings to a format that is more easily parsed by GNU Emacs.
282
# If set to yes Tidy will use the input file to create a sequence of
283
# slides, splitting the markup prior to each successive <h2>. You
284
# can see an example of the results in a recent talk I made on
285
# XHTML. The slides are written to "slide1.html", "slide2.html" etc.
288
# slide-style: filename
289
# The name of the style sheet for use with slides.
291
# new-empty-tags: tag1, tag2, tag3
292
# Use this to declare new empty inline tags. The option takes a
293
# space or comma separated list of tag names. Unless you declare
294
# new tags, Tidy will refuse to generate a tidied file if the input
295
# includes previously unknown tags. Remember to also declare
296
# empty tags as either inline or blocklevel, see below.
298
# new-inline-tags: tag1, tag2, tag3
299
# Use this to declare new non-empty inline tags. The option takes a
300
# space or comma separated list of tag names. Unless you declare
301
# new tags, Tidy will refuse to generate a tidied file if the input
302
# includes previously unknown tags.
304
# new-blocklevel-tags: tag1, tag2, tag3
305
# Use this to declare new block-level tags. The option takes a
306
# space or comma separated list of tag names. Unless you declare
307
# new tags, Tidy will refuse to generate a tidied file if the input
308
# includes previously unknown tags. Note you can't change the
309
# content model for elements such as table, ul, ol and dl. This is
310
# explained in more detail in the release notes.
312
# new-pre-tags: tag1, tag2, tag3
313
# Use this to declare new tags that are to be processed in exactly
314
# the same way as HTML's pre element. The option takes a space
315
# or comma separated list of tag names. Unless you declare new
316
# tags, Tidy will refuse to generate a tidied file if the input includes
317
# previously unknown tags. Note you can't as yet add new CDATA
318
# elements (similar to script).
6
# see tidy manpage for config examples