1tidy(1)                          User commands                         tidy(1)
2
3
4

NAME

6       tidy - validate, correct, and pretty-print HTML files
7       (version: 11 February 2007)
8

SYNOPSIS

10       tidy [option ...] [file ...] [option ...] [file ...]
11

DESCRIPTION

13       Tidy reads HTML, XHTML and XML files and writes cleaned up markup.  For
14       HTML variants, it detects and corrects many common  coding  errors  and
15       strives  to produce visually equivalent markup that is both W3C compli‐
16       ant and works on most browsers. A common use  of  Tidy  is  to  convert
17       plain  HTML  to  XHTML.  For generic XML files, Tidy is limited to cor‐
18       recting basic well-formedness errors and pretty printing.
19
20       If no input file is specified, Tidy reads the standard  input.   If  no
21       output file is specified, Tidy writes the tidied markup to the standard
22       output.  If no error file is specified, Tidy  writes  messages  to  the
23       standard error.  For command line options that expect a numerical argu‐
24       ment, a default is assumed if no meaningful value can be found.
25

OPTIONS

27   File manipulation
28       -output <file>, -o <file>
29              write output to the specified <file> (output-file: <file>)
30
31       -config <file>
32              set configuration options from the specified <file>
33
34
35       -file <file>, -f <file>
36              write errors and warnings to the specified  <file>  (error-file:
37              <file>)
38
39       -modify, -m
40              modify the original input files (write-back: yes)
41
42   Processing directives
43       -indent, -i
44              indent element content (indent: auto)
45
46       -wrap <column>, -w <column>
47              wrap text at the specified <column>. 0 is assumed if <column> is
48              missing. When this option is omitted, the default of the config‐
49              uration option "wrap" applies.  (wrap: <column>)
50
51       -upper, -u
52              force tags to upper case (uppercase-tags: yes)
53
54       -clean, -c
55              replace FONT, NOBR and CENTER tags by CSS (clean: yes)
56
57       -bare, -b
58              strip out smart quotes and em dashes, etc.  (bare: yes)
59
60       -numeric, -n
61              output  numeric  rather  than  named entities (numeric-entities:
62              yes)
63
64       -errors, -e
65              show only errors and warnings (markup: no)
66
67       -quiet, -q
68              suppress nonessential output (quiet: yes)
69
70       -omit  omit optional end tags (hide-endtags: yes)
71
72       -xml   specify the input is well formed XML (input-xml: yes)
73
74       -asxml, -asxhtml
75              convert HTML to well formed XHTML (output-xhtml: yes)
76
77       -ashtml
78              force XHTML to well formed HTML (output-html: yes)
79
80       -access <level>
81              do additional accessibility checks (<level> = 0, 1, 2, 3). 0  is
82              assumed if <level> is missing.  (accessibility-check: <level>)
83
84   Character encodings
85       -raw   output values above 127 without conversion to entities
86
87
88       -ascii use ISO-8859-1 for input, US-ASCII for output
89
90
91       -latin0
92              use ISO-8859-15 for input, US-ASCII for output
93
94
95       -latin1
96              use ISO-8859-1 for both input and output
97
98
99       -iso2022
100              use ISO-2022 for both input and output
101
102
103       -utf8  use UTF-8 for both input and output
104
105
106       -mac   use MacRoman for input, US-ASCII for output
107
108
109       -win1252
110              use Windows-1252 for input, US-ASCII for output
111
112
113       -ibm858
114              use IBM-858 (CP850+Euro) for input, US-ASCII for output
115
116
117       -utf16le
118              use UTF-16LE for both input and output
119
120
121       -utf16be
122              use UTF-16BE for both input and output
123
124
125       -utf16 use UTF-16 for both input and output
126
127
128       -big5  use Big5 for both input and output
129
130
131       -shiftjis
132              use Shift_JIS for both input and output
133
134
135       -language <lang>
136              set  the  two-letter language code <lang> (for future use) (lan‐
137              guage: <lang>)
138
139   Miscellaneous
140       -version, -v
141              show the version of Tidy
142
143
144       -help, -h, -?
145              list the command line options
146
147
148       -xml-help
149              list the command line options in XML format
150
151
152       -help-config
153              list all configuration options
154
155
156       -xml-config
157              list all configuration options in XML format
158
159
160       -show-config
161              list the current configuration settings
162
163

USAGE

165       Use --optionX valueX for the detailed  configuration  option  "optionX"
166       with  argument  "valueX".   See also below under Detailed Configuration
167       Options as to how to conveniently group all such options  in  a  single
168       config file.
169
170       Input/Output   default  to  stdin/stdout  respectively.  Single  letter
171       options apart from -f and -o may be combined as in:
172
173          tidy -f errs.txt -imu foo.html
174
175       For further info on HTML see http://www.w3.org/MarkUp.
176
177       For more information about HTML Tidy, visit the project  home  page  at
178       http://tidy.sourceforge.net.   Here,  you will find links to documenta‐
179       tion, mailing lists (with searchable  archives)  and  links  to  report
180       bugs.
181

ENVIRONMENT

183       HTML_TIDY
184              Name of the default configuration file.  This should be an abso‐
185              lute path, since you will probably invoke  tidy  from  different
186              directories.   The  value  of HTML_TIDY will be parsed after the
187              compiled-in  default  (defined  with  -DTIDY_CONFIG_FILE),   but
188              before any of the files specified using -config.
189

EXIT STATUS

191       0      All input files were processed successfully.
192
193       1      There were warnings.
194
195       2      There were errors.
196
197

______________________________

199

DETAILED CONFIGURATION OPTIONS

201       This  section  describes the Detailed (i.e., "expanded") Options, which
202       may be specified by preceding each option with -- at the command  line,
203       followed  by its desired value, OR by placing the options and values in
204       a configuration file, and telling tidy to read that file with the -con‐
205       fig standard option.
206

SYNOPSIS

208       tidy --option1 value1 --option2 value2 [standard options ...]
209       tidy -config config-file [standard options ...]
210

WARNING

212       The  options  detailed  here do not include the "standard" command-line
213       options (i.e., those preceded by a single '-') described above  in  the
214       first section of this man page.
215

DESCRIPTION

217       A  list  of  options for configuring the behavior of Tidy, which can be
218       passed either on the command line,  or  specified  in  a  configuration
219       file.
220
221       A  Tidy  configuration file is simply a text file, where each option is
222       listed on a separate line in the form
223
224          option1: value1
225          option2: value2
226          etc.
227
228       The permissible values for a given option depend on the option's  Type.
229       There  are  five  types:  Boolean, AutoBool, DocType, Enum, and String.
230       Boolean types allow any of yes/no, y/n, true/false,  t/f,  1/0.   Auto‐
231       Bools  allow auto in addition to the values allowed by Booleans.  Inte‐
232       ger types take non-negative integers.  String types generally  have  no
233       defaults,  and  you  should provide them in non-quoted form (unless you
234       wish the output to contain the literal quotes).
235
236       Enum, Encoding, and DocType "types" have a fixed repertoire  of  items;
237       consult the Example[s] provided below for the option[s] in question.
238
239       You  only  need  to provide options and values for those whose defaults
240       you wish to override, although you may wish to  include  some  already-
241       defaulted  options and values for the sake of documentation and explic‐
242       itness.
243
244       Here is a sample config file, with at least one example of each of  the
245       five Types:
246
247
248           // sample Tidy configuration options
249           output-xhtml: yes
250           add-xml-decl: no
251           doctype: strict
252           char-encoding: ascii
253           indent: auto
254           wrap: 76
255           repeated-attributes: keep-last
256           error-file: errs.txt
257
258       Below  is  a summary and brief description of each of the options. They
259       are listed alphabetically within each category.  There are  five  cate‐
260       gories:  HTML,  XHTML,  XML  options, Diagnostics options, Pretty Print
261       options, Character Encoding options, and Miscellaneous options.
262

OPTIONS

264   HTML, XHTML, XML options:
265       add-xml-decl
266
267              Type:    Boolean
268              Default: no
269              Example: y/n, yes/no, t/f, true/false, 1/0
270
271              This option specifies if Tidy should  add  the  XML  declaration
272              when  outputting  XML  or  XHTML. Note that if the input already
273              includes an <?xml ... ?> declaration then this  option  will  be
274              ignored.  If  the  encoding  for  the  output  is different from
275              "ascii", one of the utf encodings or "raw", the  declaration  is
276              always added as required by the XML standard.
277
278
279                                      See also: char-encoding, output-encoding
280
281       add-xml-space
282
283              Type:    Boolean
284              Default: no
285              Example: y/n, yes/no, t/f, true/false, 1/0
286
287              This option specifies if Tidy should add xml:space="preserve" to
288              elements such as <PRE>, <STYLE>  and  <SCRIPT>  when  generating
289              XML.  This is needed if the whitespace in such elements is to be
290              parsed appropriately without having access to the DTD.
291
292       alt-text
293
294              Type:    String
295              Default: -
296              Default: -
297
298              This option specifies the default  "alt="  text  Tidy  uses  for
299              <IMG>  attributes.  This  feature  is dangerous as it suppresses
300              further accessibility warnings. You are responsible  for  making
301              your documents accessible to people who can not see the images!
302
303       assume-xml-procins
304
305              Type:    Boolean
306              Default: no
307              Example: y/n, yes/no, t/f, true/false, 1/0
308
309              This  option specifies if Tidy should change the parsing of pro‐
310              cessing instructions to require ?> as the terminator rather than
311              >. This option is automatically set if the input is in XML.
312
313       bare
314
315              Type:    Boolean
316              Default: no
317              Example: y/n, yes/no, t/f, true/false, 1/0
318
319              This  option  specifies  if Tidy should strip Microsoft specific
320              HTML from Word 2000 documents, and  output  spaces  rather  than
321              non-breaking spaces where they exist in the input.
322
323       clean
324
325              Type:    Boolean
326              Default: no
327              Example: y/n, yes/no, t/f, true/false, 1/0
328
329              This option specifies if Tidy should strip out surplus presenta‐
330              tional tags and attributes replacing them  by  style  rules  and
331              structural  markup  as  appropriate.  It  works well on the HTML
332              saved by Microsoft Office products.
333
334       css-prefix
335
336              Type:    String
337              Default: -
338              Default: -
339
340              This option specifies the  prefix  that  Tidy  uses  for  styles
341              rules. By default, "c" will be used.
342
343       decorate-inferred-ul
344
345              Type:    Boolean
346              Default: no
347              Example: y/n, yes/no, t/f, true/false, 1/0
348
349              This  option  specifies if Tidy should decorate inferred UL ele‐
350              ments with some CSS markup to avoid indentation to the right.
351
352       doctype
353
354              Type:    DocType
355              Default: auto
356              Example: omit, auto, strict, transitional, user
357
358              This option specifies the DOCTYPE declaration generated by Tidy.
359              If set to "omit" the output won't contain a DOCTYPE declaration.
360              If set to "auto" (the default) Tidy will use an  educated  guess
361              based  upon  the  contents  of the document. If set to "strict",
362              Tidy will set the DOCTYPE to the strict DTD. If set to  "loose",
363              the  DOCTYPE  is  set  to the loose (transitional) DTD. Alterna‐
364              tively, you can supply a string for the formal public identifier
365              (FPI).
366
367              For example:
368              doctype: "-//ACME//DTD HTML 3.14159//EN"
369
370              If  you specify the FPI for an XHTML document, Tidy will set the
371              system identifier to an empty string. For an HTML document, Tidy
372              adds  a  system  identifier  only  if one was already present in
373              order to preserve the processing mode  of  some  browsers.  Tidy
374              leaves  the  DOCTYPE for generic XML documents unchanged. --doc‐
375              type omit implies --numeric-entities yes. This option  does  not
376              offer a validation of the document conformance.
377
378       drop-empty-paras
379
380              Type:    Boolean
381              Default: yes
382              Example: y/n, yes/no, t/f, true/false, 1/0
383
384              This option specifies if Tidy should discard empty paragraphs.
385
386       drop-font-tags
387
388              Type:    Boolean
389              Default: no
390              Example: y/n, yes/no, t/f, true/false, 1/0
391
392              This option specifies if Tidy should discard <FONT> and <CENTER>
393              tags without creating the corresponding style rules. This option
394              can be set independently of the clean option.
395
396       drop-proprietary-attributes
397
398              Type:    Boolean
399              Default: no
400              Example: y/n, yes/no, t/f, true/false, 1/0
401
402              This  option  specifies  if  Tidy  should  strip out proprietary
403              attributes, such as MS data binding attributes.
404
405       enclose-block-text
406
407              Type:    Boolean
408              Default: no
409              Example: y/n, yes/no, t/f, true/false, 1/0
410
411              This option specifies if Tidy should insert  a  <P>  element  to
412              enclose  any text it finds in any element that allows mixed con‐
413              tent for HTML transitional but not HTML strict.
414
415       enclose-text
416
417              Type:    Boolean
418              Default: no
419              Example: y/n, yes/no, t/f, true/false, 1/0
420
421              This option specifies if Tidy should enclose any text  it  finds
422              in  the  body  element within a <P> element. This is useful when
423              you want to take existing HTML and use it with a style sheet.
424
425       escape-cdata
426
427              Type:    Boolean
428              Default: no
429              Example: y/n, yes/no, t/f, true/false, 1/0
430
431              This option specifies if Tidy should convert  <![CDATA[]]>  sec‐
432              tions to normal text.
433
434       fix-backslash
435
436              Type:    Boolean
437              Default: yes
438              Example: y/n, yes/no, t/f, true/false, 1/0
439
440              This  option  specifies if Tidy should replace backslash charac‐
441              ters "\" in URLs by forward slashes "/".
442
443       fix-bad-comments
444
445              Type:    Boolean
446              Default: yes
447              Example: y/n, yes/no, t/f, true/false, 1/0
448
449              This option specifies if Tidy should replace unexpected  hyphens
450              with  "="  characters when it comes across adjacent hyphens. The
451              default is yes. This option is provided for users of Cold Fusion
452              which uses the comment syntax: <!--- --->
453
454       fix-uri
455
456              Type:    Boolean
457              Default: yes
458              Example: y/n, yes/no, t/f, true/false, 1/0
459
460              This option specifies if Tidy should check attribute values that
461              carry URIs for illegal characters and if such are found,  escape
462              them as HTML 4 recommends.
463
464       hide-comments
465
466              Type:    Boolean
467              Default: no
468              Example: y/n, yes/no, t/f, true/false, 1/0
469
470              This option specifies if Tidy should print out comments.
471
472       hide-endtags
473
474              Type:    Boolean
475              Default: no
476              Example: y/n, yes/no, t/f, true/false, 1/0
477
478              This option specifies if Tidy should omit optional end-tags when
479              generating the pretty printed markup. This option is ignored  if
480              you are outputting to XML.
481
482       indent-cdata
483
484              Type:    Boolean
485              Default: no
486              Example: y/n, yes/no, t/f, true/false, 1/0
487
488              This  option  specifies  if Tidy should indent <![CDATA[]]> sec‐
489              tions.
490
491       input-xml
492
493              Type:    Boolean
494              Default: no
495              Example: y/n, yes/no, t/f, true/false, 1/0
496
497              This option specifies if Tidy should use the XML  parser  rather
498              than the error correcting HTML parser.
499
500       join-classes
501
502              Type:    Boolean
503              Default: no
504              Example: y/n, yes/no, t/f, true/false, 1/0
505
506              This option specifies if Tidy should combine class names to gen‐
507              erate a single new class name, if multiple class assignments are
508              detected on an element.
509
510
511                                    See also: join-styles, repeated-attributes
512
513       join-styles
514
515              Type:    Boolean
516              Default: yes
517              Example: y/n, yes/no, t/f, true/false, 1/0
518
519              This  option specifies if Tidy should combine styles to generate
520              a single new style, if multiple style values are detected on  an
521              element.
522
523
524                                   See also: join-classes, repeated-attributes
525
526       literal-attributes
527
528              Type:    Boolean
529              Default: no
530              Example: y/n, yes/no, t/f, true/false, 1/0
531
532              This  option  specifies  if  Tidy  should ensure that whitespace
533              characters within attribute values are passed through unchanged.
534
535       logical-emphasis
536
537              Type:    Boolean
538              Default: no
539              Example: y/n, yes/no, t/f, true/false, 1/0
540
541              This option specifies if Tidy should replace any  occurrence  of
542              <I>  by  <EM>  and  any  occurrence  of <B> by <STRONG>. In both
543              cases, the attributes are preserved unchanged. This  option  can
544              be set independently of the clean and drop-font-tags options.
545
546       lower-literals
547
548              Type:    Boolean
549              Default: yes
550              Example: y/n, yes/no, t/f, true/false, 1/0
551
552              This  option  specifies  if  Tidy should convert the value of an
553              attribute that takes a list of predefined values to lower  case.
554              This is required for XHTML documents.
555
556       merge-divs
557
558              Type:    AutoBool
559              Default: auto
560              Example: auto, y/n, yes/no, t/f, true/false, 1/0
561
562              Can  be used to modify behavior of -c (--clean yes) option. This
563              option specifies if Tidy  should  merge  nested  <div>  such  as
564              "<div><div>...</div></div>". If set to "auto", the attributes of
565              the inner <div> are moved to the  outer  one.  As  well,  nested
566              <div>  with  ID  attributes are not merged. If set to "yes", the
567              attributes of the inner <div> are discarded with  the  exception
568              of "class" and "style".
569
570
571                                                               See also: clean
572
573       ncr
574
575              Type:    Boolean
576              Default: yes
577              Example: y/n, yes/no, t/f, true/false, 1/0
578
579              This  option  specifies  if  Tidy should allow numeric character
580              references.
581
582       new-blocklevel-tags
583
584              Type:    Tag names
585              Default: -
586              Example: tagX, tagY, ...
587
588              This option specifies new block-level tags. This option takes  a
589              space  or  comma separated list of tag names. Unless you declare
590              new tags, Tidy will refuse to generate  a  tidied  file  if  the
591              input  includes  previously  unknown tags. Note you can't change
592              the content model for elements such as <TABLE>, <UL>,  <OL>  and
593              <DL>. This option is ignored in XML mode.
594
595
596                       See also: new-empty-tags, new-inline-tags, new-pre-tags
597
598       new-empty-tags
599
600              Type:    Tag names
601              Default: -
602              Example: tagX, tagY, ...
603
604              This option specifies new empty inline tags. This option takes a
605              space or comma separated list of tag names. Unless  you  declare
606              new  tags,  Tidy  will  refuse  to generate a tidied file if the
607              input includes previously unknown tags. Remember to also declare
608              empty  tags  as  either  inline  or  blocklevel.  This option is
609              ignored in XML mode.
610
611
612                  See also: new-blocklevel-tags, new-inline-tags, new-pre-tags
613
614       new-inline-tags
615
616              Type:    Tag names
617              Default: -
618              Example: tagX, tagY, ...
619
620              This option specifies new non-empty  inline  tags.  This  option
621              takes  a  space or comma separated list of tag names. Unless you
622              declare new tags, Tidy will refuse to generate a tidied file  if
623              the  input  includes  previously  unknown  tags.  This option is
624              ignored in XML mode.
625
626
627                   See also: new-blocklevel-tags, new-empty-tags, new-pre-tags
628
629       new-pre-tags
630
631              Type:    Tag names
632              Default: -
633              Example: tagX, tagY, ...
634
635              This option specifies new tags  that  are  to  be  processed  in
636              exactly  the same way as HTML's <PRE> element. This option takes
637              a space or comma separated list of tag names. Unless you declare
638              new  tags,  Tidy  will  refuse  to generate a tidied file if the
639              input includes previously unknown tags. Note you can not as  yet
640              add  new  CDATA  elements  (similar to <SCRIPT>). This option is
641              ignored in XML mode.
642
643
644                See also: new-blocklevel-tags, new-empty-tags, new-inline-tags
645
646       numeric-entities
647
648              Type:    Boolean
649              Default: no
650              Example: y/n, yes/no, t/f, true/false, 1/0
651
652              This option specifies if Tidy should output entities other  than
653              the built-in HTML entities (&amp;, &lt;, &gt; and &quot;) in the
654              numeric rather than the named entity form. Only entities compat‐
655              ible  with  the DOCTYPE declaration generated are used. Entities
656              that can be represented in the output  encoding  are  translated
657              correspondingly.
658
659
660                                          See also: doctype, preserve-entities
661
662       output-html
663
664              Type:    Boolean
665              Default: no
666              Example: y/n, yes/no, t/f, true/false, 1/0
667
668              This  option  specifies  if  Tidy should generate pretty printed
669              output, writing it as HTML.
670
671       output-xhtml
672
673              Type:    Boolean
674              Default: no
675              Example: y/n, yes/no, t/f, true/false, 1/0
676
677              This option specifies if Tidy  should  generate  pretty  printed
678              output,  writing  it as extensible HTML. This option causes Tidy
679              to set the DOCTYPE  and  default  namespace  as  appropriate  to
680              XHTML.  If a DOCTYPE or namespace is given they will checked for
681              consistency with the content of the document. In the case of  an
682              inconsistency,  the  corrected values will appear in the output.
683              For XHTML, entities can be written as named or numeric  entities
684              according  to  the setting of the "numeric-entities" option. The
685              original case of tags and attributes will be preserved,  regard‐
686              less of other options.
687
688       output-xml
689
690              Type:    Boolean
691              Default: no
692              Example: y/n, yes/no, t/f, true/false, 1/0
693
694              This  option specifies if Tidy should pretty print output, writ‐
695              ing it as well-formed XML. Any entities not defined in  XML  1.0
696              will  be  written as numeric entities to allow them to be parsed
697              by a XML parser. The original case of tags and  attributes  will
698              be preserved, regardless of other options.
699
700       preserve-entities
701
702              Type:    Boolean
703              Default: no
704              Example: y/n, yes/no, t/f, true/false, 1/0
705
706              This  option  specifies  if Tidy should preserve the well-formed
707              entitites as found in the input.
708
709       quote-ampersand
710
711              Type:    Boolean
712              Default: yes
713              Example: y/n, yes/no, t/f, true/false, 1/0
714
715              This option specifies if Tidy should output unadorned &  charac‐
716              ters as &amp;.
717
718       quote-marks
719
720              Type:    Boolean
721              Default: no
722              Example: y/n, yes/no, t/f, true/false, 1/0
723
724              This  option  specifies  if  Tidy  should output " characters as
725              &quot; as is preferred by some editing environments.  The  apos‐
726              trophe  character  '  is  written  out  as  &#39; since many web
727              browsers don't yet support &apos;.
728
729       quote-nbsp
730
731              Type:    Boolean
732              Default: yes
733              Example: y/n, yes/no, t/f, true/false, 1/0
734
735              This option specifies if Tidy should output  non-breaking  space
736              characters  as  entities,  rather  than as the Unicode character
737              value 160 (decimal).
738
739       repeated-attributes
740
741              Type:    enum
742              Default: keep-last
743              Example: keep-first, keep-last
744
745              This option specifies if Tidy should  keep  the  first  or  last
746              attribute,  if  an  attribute  is  repeated,  e.g. has two align
747              attributes.
748
749
750                                           See also: join-classes, join-styles
751
752       replace-color
753
754              Type:    Boolean
755              Default: no
756              Example: y/n, yes/no, t/f, true/false, 1/0
757
758              This option specifies if Tidy should replace numeric  values  in
759              color  attributes  by HTML/XHTML color names where defined, e.g.
760              replace "#ffffff" with "white".
761
762       show-body-only
763
764              Type:    Boolean
765              Default: no
766              Example: y/n, yes/no, t/f, true/false, 1/0
767
768              This option specifies if Tidy should print only the contents  of
769              the  body  tag  as  an  HTML  fragment. Useful for incorporating
770              existing whole pages as a portion of another page.
771
772       uppercase-attributes
773
774              Type:    Boolean
775              Default: no
776              Example: y/n, yes/no, t/f, true/false, 1/0
777
778              This option specifies if Tidy should output attribute  names  in
779              upper  case.  The  default  is  no,  which results in lower case
780              attribute names, except for XML input, where the  original  case
781              is preserved.
782
783       uppercase-tags
784
785              Type:    Boolean
786              Default: no
787              Example: y/n, yes/no, t/f, true/false, 1/0
788
789              This  option  specifies if Tidy should output tag names in upper
790              case. The default is no, which results in lower case tag  names,
791              except for XML input, where the original case is preserved.
792
793       word-2000
794
795              Type:    Boolean
796              Default: no
797              Example: y/n, yes/no, t/f, true/false, 1/0
798
799              This  option specifies if Tidy should go to great pains to strip
800              out all the surplus stuff Microsoft Word 2000 inserts  when  you
801              save  Word  documents  as  "Web  pages". Doesn't handle embedded
802              images or VML. You should consider using Word's  "Save  As:  Web
803              Page, Filtered".
804
805   Diagnostics options:
806       accessibility-check
807
808              Type:    enum
809              Default: 0 (Tidy Classic)
810              Example:  0 (Tidy Classic), 1 (Priority 1 Checks), 2 (Priority 2
811              Checks), 3 (Priority 3 Checks)
812
813              This option specifies what level of accessibility  checking,  if
814              any,  that  Tidy  should do. Level 0 is equivalent to Tidy Clas‐
815              sic's accessibility checking. For  more  information  on  Tidy's
816              accessibility  checking,  visit the Adaptive Technology Resource
817              Centre     at     the     University     of      Toronto      at
818              http://www.aprompt.ca/Tidy/accessibilitychecks.html.
819
820       show-errors
821
822              Type:    Integer
823              Default: 6
824              Example: 0, 1, 2, ...
825
826              This  option specifies the number Tidy uses to determine if fur‐
827              ther errors should be shown. If set to 0,  then  no  errors  are
828              shown.
829
830       show-warnings
831
832              Type:    Boolean
833              Default: yes
834              Example: y/n, yes/no, t/f, true/false, 1/0
835
836              This option specifies if Tidy should suppress warnings. This can
837              be useful when a few errors are hidden in a flurry of warnings.
838
839   Pretty Print options:
840       break-before-br
841
842              Type:    Boolean
843              Default: no
844              Example: y/n, yes/no, t/f, true/false, 1/0
845
846              This option specifies if Tidy should output a line break  before
847              each <BR> element.
848
849       indent
850
851              Type:    AutoBool
852              Default: no
853              Example: auto, y/n, yes/no, t/f, true/false, 1/0
854
855              This option specifies if Tidy should indent block-level tags. If
856              set to "auto", this option causes Tidy to decide whether or  not
857              to  indent the content of tags such as TITLE, H1-H6, LI, TD, TD,
858              or P depending on whether or not the content includes  a  block-
859              level element. You are advised to avoid setting indent to yes as
860              this can expose layout bugs in some browsers.
861
862
863                                                       See also: indent-spaces
864
865       indent-attributes
866
867              Type:    Boolean
868              Default: no
869              Example: y/n, yes/no, t/f, true/false, 1/0
870
871              This option specifies if Tidy should begin each attribute  on  a
872              new line.
873
874       indent-spaces
875
876              Type:    Integer
877              Default: 2
878              Example: 0, 1, 2, ...
879
880              This  option  specifies the number of spaces Tidy uses to indent
881              content, when indentation is enabled.
882
883
884                                                              See also: indent
885
886       markup
887
888              Type:    Boolean
889              Default: yes
890              Example: y/n, yes/no, t/f, true/false, 1/0
891
892              This option specifies if Tidy should generate a  pretty  printed
893              version  of  the  markup. Note that Tidy won't generate a pretty
894              printed version if it finds significant errors  (see  force-out‐
895              put).
896
897       punctuation-wrap
898
899              Type:    Boolean
900              Default: no
901              Example: y/n, yes/no, t/f, true/false, 1/0
902
903              This  option  specifies if Tidy should line wrap after some Uni‐
904              code or Chinese punctuation characters.
905
906       split
907
908              Type:    Boolean
909              Default: no
910              Example: y/n, yes/no, t/f, true/false, 1/0
911
912              Currently not used. Tidy Classic only.
913
914       tab-size
915
916              Type:    Integer
917              Default: 8
918              Example: 0, 1, 2, ...
919
920              This option specifies the  number  of  columns  that  Tidy  uses
921              between  successive  tab stops. It is used to map tabs to spaces
922              when reading the input. Tidy never outputs tabs.
923
924       vertical-space
925
926              Type:    Boolean
927              Default: no
928              Example: y/n, yes/no, t/f, true/false, 1/0
929
930              This option specifies if Tidy should add some  empty  lines  for
931              readability.
932
933       wrap
934
935              Type:    Integer
936              Default: 68
937              Example: 0 (no wrapping), 1, 2, ...
938
939              This  option specifies the right margin Tidy uses for line wrap‐
940              ping. Tidy tries to wrap lines so that they do not  exceed  this
941              length. Set wrap to zero if you want to disable line wrapping.
942
943       wrap-asp
944
945              Type:    Boolean
946              Default: yes
947              Example: y/n, yes/no, t/f, true/false, 1/0
948
949              This  option  specifies  if Tidy should line wrap text contained
950              within ASP pseudo elements, which look like: <% ... %>.
951
952       wrap-attributes
953
954              Type:    Boolean
955              Default: no
956              Example: y/n, yes/no, t/f, true/false, 1/0
957
958              This option specifies if Tidy should line wrap attribute values,
959              for  easier  editing.  This  option  can be set independently of
960              wrap-script-literals.
961
962
963                                                See also: wrap-script-literals
964
965       wrap-jste
966
967              Type:    Boolean
968              Default: yes
969              Example: y/n, yes/no, t/f, true/false, 1/0
970
971              This option specifies if Tidy should line  wrap  text  contained
972              within JSTE pseudo elements, which look like: <# ... #>.
973
974       wrap-php
975
976              Type:    Boolean
977              Default: yes
978              Example: y/n, yes/no, t/f, true/false, 1/0
979
980              This  option  specifies  if Tidy should line wrap text contained
981              within PHP pseudo elements, which look like: <?php ... ?>.
982
983       wrap-script-literals
984
985              Type:    Boolean
986              Default: no
987              Example: y/n, yes/no, t/f, true/false, 1/0
988
989              This option specifies if Tidy should line wrap  string  literals
990              that  appear in script attributes. Tidy wraps long script string
991              literals by inserting a  backslash  character  before  the  line
992              break.
993
994
995                                                     See also: wrap-attributes
996
997       wrap-sections
998
999              Type:    Boolean
1000              Default: yes
1001              Example: y/n, yes/no, t/f, true/false, 1/0
1002
1003              This  option  specifies  if Tidy should line wrap text contained
1004              within <![ ... ]> section tags.
1005
1006   Character Encoding options:
1007       ascii-chars
1008
1009              Type:    Boolean
1010              Default: no
1011              Example: y/n, yes/no, t/f, true/false, 1/0
1012
1013              Can be used to modify behavior of -c (--clean  yes)  option.  If
1014              set  to  "yes" when using -c, &emdash;, &rdquo;, and other named
1015              character entities are downgraded to their closest ascii equiva‐
1016              lents.
1017
1018
1019                                                               See also: clean
1020
1021       char-encoding
1022
1023              Type:    Encoding
1024              Default: ascii
1025              Example:   raw,  ascii,  latin0,  latin1,  utf8,  iso2022,  mac,
1026              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1027
1028              This option specifies the character encoding Tidy uses for  both
1029              the  input  and  output.  For  ascii,  Tidy  will accept Latin-1
1030              (ISO-8859-1) character values, but will  use  entities  for  all
1031              characters  whose  value > 127. For raw, Tidy will output values
1032              above 127 without translating them into  entities.  For  latin1,
1033              characters above 255 will be written as entities. For utf8, Tidy
1034              assumes that both input and output is encoded as UTF-8. You  can
1035              use  iso2022  for  files  encoded  using  the ISO-2022 family of
1036              encodings e.g. ISO-2022-JP.  For  mac  and  win1252,  Tidy  will
1037              accept  vendor  specific character values, but will use entities
1038              for all characters whose value > 127.
1039
1040
1041                                     See also: input-encoding, output-encoding
1042
1043       input-encoding
1044
1045              Type:    Encoding
1046              Default: latin1
1047              Example:  raw,  ascii,  latin0,  latin1,  utf8,  iso2022,   mac,
1048              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1049
1050              This  option  specifies the character encoding Tidy uses for the
1051              input. See char-encoding for more info.
1052
1053
1054                                                       See also: char-encoding
1055
1056       language
1057
1058              Type:    String
1059              Default: -
1060              Default: -
1061
1062              Currently not used, but this option specifies the language  Tidy
1063              uses (for instance "en").
1064
1065       newline
1066
1067              Type:    enum
1068              Default: Platform dependent
1069              Example: LF, CRLF, CR
1070
1071              The  default is appropriate to the current platform: CRLF on PC-
1072              DOS, MS-Windows and OS/2, CR on Classic Mac OS,  and  LF  every‐
1073              where else (Unix and Linux).
1074
1075       output-bom
1076
1077              Type:    AutoBool
1078              Default: auto
1079              Example: auto, y/n, yes/no, t/f, true/false, 1/0
1080
1081              This  option specifies if Tidy should write a Unicode Byte Order
1082              Mark character (BOM; also known as Zero  Width  No-Break  Space;
1083              has  value  of  U+FEFF) to the beginning of the output; only for
1084              UTF-8 and UTF-16 output encodings. If set to "auto", this option
1085              causes  Tidy  to  write  a  BOM  to the output only if a BOM was
1086              present at the beginning of the input. A BOM is  always  written
1087              for XML/XHTML output using UTF-16 output encodings.
1088
1089       output-encoding
1090
1091              Type:    Encoding
1092              Default: ascii
1093              Example:   raw,  ascii,  latin0,  latin1,  utf8,  iso2022,  mac,
1094              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1095
1096              This option specifies the character encoding Tidy uses  for  the
1097              output.  See  char-encoding for more info. May only be different
1098              from input-encoding for Latin encodings (ascii, latin0,  latin1,
1099              mac, win1252, ibm858).
1100
1101
1102                                                       See also: char-encoding
1103
1104   Miscellaneous options:
1105       error-file
1106
1107              Type:    String
1108              Default: -
1109              Default: -
1110
1111              This  option  specifies  the error file Tidy uses for errors and
1112              warnings. Normally errors and warnings are output to "stderr".
1113
1114
1115                                                         See also: output-file
1116
1117       force-output
1118
1119              Type:    Boolean
1120              Default: no
1121              Example: y/n, yes/no, t/f, true/false, 1/0
1122
1123              This option specifies if Tidy  should  produce  output  even  if
1124              errors  are  encountered.  Use  this  option with care - if Tidy
1125              reports an error, this means Tidy was not able  to,  or  is  not
1126              sure  how  to,  fix  the  error, so the resulting output may not
1127              reflect your intention.
1128
1129       gnu-emacs
1130
1131              Type:    Boolean
1132              Default: no
1133              Example: y/n, yes/no, t/f, true/false, 1/0
1134
1135              This option specifies if  Tidy  should  change  the  format  for
1136              reporting  errors  and  warnings to a format that is more easily
1137              parsed by GNU Emacs.
1138
1139       gnu-emacs-file
1140
1141              Type:    String
1142              Default: -
1143              Default: -
1144
1145              Used internally.
1146
1147       keep-time
1148
1149              Type:    Boolean
1150              Default: no
1151              Example: y/n, yes/no, t/f, true/false, 1/0
1152
1153              This option specifies if Tidy should keep the original modifica‐
1154              tion  time  of files that Tidy modifies in place. The default is
1155              no. Setting the option to yes allows you to tidy  files  without
1156              causing  these files to be uploaded to a web server when using a
1157              tool such as SiteCopy. Note this feature  is  not  supported  on
1158              some platforms.
1159
1160       output-file
1161
1162              Type:    String
1163              Default: -
1164              Default: -
1165
1166              This option specifies the output file Tidy uses for markup. Nor‐
1167              mally markup is written to "stdout".
1168
1169
1170                                                          See also: error-file
1171
1172       quiet
1173
1174              Type:    Boolean
1175              Default: no
1176              Example: y/n, yes/no, t/f, true/false, 1/0
1177
1178              This option specifies if Tidy should output the summary  of  the
1179              numbers  of errors and warnings, or the welcome or informational
1180              messages.
1181
1182       slide-style
1183
1184              Type:    String
1185              Default: -
1186              Default: -
1187
1188              Currently not used. Tidy Classic only.
1189
1190       tidy-mark
1191
1192              Type:    Boolean
1193              Default: yes
1194              Example: y/n, yes/no, t/f, true/false, 1/0
1195
1196              This option specifies if Tidy should add a meta element  to  the
1197              document  head  to  indicate  that the document has been tidied.
1198              Tidy won't add a meta element if one is already present.
1199
1200       write-back
1201
1202              Type:    Boolean
1203              Default: no
1204              Example: y/n, yes/no, t/f, true/false, 1/0
1205
1206              This option specifies if  Tidy  should  write  back  the  tidied
1207              markup  to  the  same file it read from. You are advised to keep
1208              copies of important files before tidying them, as on rare  occa‐
1209              sions the result may not be what you expect.
1210

SEE ALSO

1212       HTML Tidy Project Page at http://tidy.sourceforge.net
1213

AUTHOR

1215       Tidy  was  written  by Dave Raggett <dsr@w3.org>, and is now maintained
1216       and developed by the Tidy team at http://tidy.sourceforge.net/.  It  is
1217       released under the MIT Licence.
1218
1219       Generated automatically with HTML Tidy released on 11 February 2007.
1220
1221
1222
1223HTML Tidy 11 February 2007$Date: 2007/02/01 12:25:21 $                  tidy(1)
Impressum