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

NAME

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

SEE ALSO

1258       HTML Tidy Project Page at http://tidy.sourceforge.net
1259

AUTHOR

1261       Tidy was written by Dave Raggett <dsr@w3.org>, and  is  now  maintained
1262       and  developed by the Tidy team at http://tidy.sourceforge.net/.  It is
1263       released under the MIT Licence.
1264
1265       Generated automatically with HTML Tidy released on 25 March 2009.
1266
1267
1268
1269HTML Tidy 25 March 2009  $Date: 2007/02/01 12:25:21 $                  tidy(1)
Impressum