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

NAME

6       tidy - validate, correct, and pretty-print HTML files
7       (version: 14 June 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:    AutoBool
765              Default: no
766              Example: auto, 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. If set to "auto", this is per‐
770              formed only if the body tag has been inferred. Useful for incor‐
771              porating existing whole pages as a portion of another page.
772
773       uppercase-attributes
774
775              Type:    Boolean
776              Default: no
777              Example: y/n, yes/no, t/f, true/false, 1/0
778
779              This  option  specifies if Tidy should output attribute names in
780              upper case. The default is  no,  which  results  in  lower  case
781              attribute  names,  except for XML input, where the original case
782              is preserved.
783
784       uppercase-tags
785
786              Type:    Boolean
787              Default: no
788              Example: y/n, yes/no, t/f, true/false, 1/0
789
790              This option specifies if Tidy should output tag names  in  upper
791              case.  The default is no, which results in lower case tag names,
792              except for XML input, where the original case is preserved.
793
794       word-2000
795
796              Type:    Boolean
797              Default: no
798              Example: y/n, yes/no, t/f, true/false, 1/0
799
800              This option specifies if Tidy should go to great pains to  strip
801              out  all  the surplus stuff Microsoft Word 2000 inserts when you
802              save Word documents as  "Web  pages".  Doesn't  handle  embedded
803              images  or  VML.  You should consider using Word's "Save As: Web
804              Page, Filtered".
805
806   Diagnostics options:
807       accessibility-check
808
809              Type:    enum
810              Default: 0 (Tidy Classic)
811              Example: 0 (Tidy Classic), 1 (Priority 1 Checks), 2 (Priority  2
812              Checks), 3 (Priority 3 Checks)
813
814              This  option  specifies what level of accessibility checking, if
815              any, that Tidy should do. Level 0 is equivalent  to  Tidy  Clas‐
816              sic's  accessibility  checking.  For  more information on Tidy's
817              accessibility checking, visit the Adaptive  Technology  Resource
818              Centre      at      the     University     of     Toronto     at
819              http://www.aprompt.ca/Tidy/accessibilitychecks.html.
820
821       show-errors
822
823              Type:    Integer
824              Default: 6
825              Example: 0, 1, 2, ...
826
827              This option specifies the number Tidy uses to determine if  fur‐
828              ther  errors  should  be  shown. If set to 0, then no errors are
829              shown.
830
831       show-warnings
832
833              Type:    Boolean
834              Default: yes
835              Example: y/n, yes/no, t/f, true/false, 1/0
836
837              This option specifies if Tidy should suppress warnings. This can
838              be useful when a few errors are hidden in a flurry of warnings.
839
840   Pretty Print options:
841       break-before-br
842
843              Type:    Boolean
844              Default: no
845              Example: y/n, yes/no, t/f, true/false, 1/0
846
847              This  option specifies if Tidy should output a line break before
848              each <BR> element.
849
850       indent
851
852              Type:    AutoBool
853              Default: no
854              Example: auto, y/n, yes/no, t/f, true/false, 1/0
855
856              This option specifies if Tidy should indent block-level tags. If
857              set  to "auto", this option causes Tidy to decide whether or not
858              to indent the content of tags such as TITLE, H1-H6, LI, TD,  TD,
859              or  P  depending on whether or not the content includes a block-
860              level element. You are advised to avoid setting indent to yes as
861              this can expose layout bugs in some browsers.
862
863
864                                                       See also: indent-spaces
865
866       indent-attributes
867
868              Type:    Boolean
869              Default: no
870              Example: y/n, yes/no, t/f, true/false, 1/0
871
872              This  option  specifies if Tidy should begin each attribute on a
873              new line.
874
875       indent-spaces
876
877              Type:    Integer
878              Default: 2
879              Example: 0, 1, 2, ...
880
881              This option specifies the number of spaces Tidy uses  to  indent
882              content, when indentation is enabled.
883
884
885                                                              See also: indent
886
887       markup
888
889              Type:    Boolean
890              Default: yes
891              Example: y/n, yes/no, t/f, true/false, 1/0
892
893              This  option  specifies if Tidy should generate a pretty printed
894              version of the markup. Note that Tidy won't  generate  a  pretty
895              printed  version  if it finds significant errors (see force-out‐
896              put).
897
898       punctuation-wrap
899
900              Type:    Boolean
901              Default: no
902              Example: y/n, yes/no, t/f, true/false, 1/0
903
904              This option specifies if Tidy should line wrap after  some  Uni‐
905              code or Chinese punctuation characters.
906
907       sort-attributes
908
909              Type:    enum
910              Default: none
911              Example: none, alpha
912
913              This option specifies that tidy should sort attributes within an
914              element using the specified sort algorithm. If set  to  "alpha",
915              the algorithm is an ascending alphabetic sort.
916
917       split
918
919              Type:    Boolean
920              Default: no
921              Example: y/n, yes/no, t/f, true/false, 1/0
922
923              Currently not used. Tidy Classic only.
924
925       tab-size
926
927              Type:    Integer
928              Default: 8
929              Example: 0, 1, 2, ...
930
931              This  option  specifies  the  number  of  columns that Tidy uses
932              between successive tab stops. It is used to map tabs  to  spaces
933              when reading the input. Tidy never outputs tabs.
934
935       vertical-space
936
937              Type:    Boolean
938              Default: no
939              Example: y/n, yes/no, t/f, true/false, 1/0
940
941              This  option  specifies  if Tidy should add some empty lines for
942              readability.
943
944       wrap
945
946              Type:    Integer
947              Default: 68
948              Example: 0 (no wrapping), 1, 2, ...
949
950              This option specifies the right margin Tidy uses for line  wrap‐
951              ping.  Tidy  tries to wrap lines so that they do not exceed this
952              length. Set wrap to zero if you want to disable line wrapping.
953
954       wrap-asp
955
956              Type:    Boolean
957              Default: yes
958              Example: y/n, yes/no, t/f, true/false, 1/0
959
960              This option specifies if Tidy should line  wrap  text  contained
961              within ASP pseudo elements, which look like: <% ... %>.
962
963       wrap-attributes
964
965              Type:    Boolean
966              Default: no
967              Example: y/n, yes/no, t/f, true/false, 1/0
968
969              This option specifies if Tidy should line wrap attribute values,
970              for easier editing. This option  can  be  set  independently  of
971              wrap-script-literals.
972
973
974                                                See also: wrap-script-literals
975
976       wrap-jste
977
978              Type:    Boolean
979              Default: yes
980              Example: y/n, yes/no, t/f, true/false, 1/0
981
982              This  option  specifies  if Tidy should line wrap text contained
983              within JSTE pseudo elements, which look like: <# ... #>.
984
985       wrap-php
986
987              Type:    Boolean
988              Default: yes
989              Example: y/n, yes/no, t/f, true/false, 1/0
990
991              This option specifies if Tidy should line  wrap  text  contained
992              within PHP pseudo elements, which look like: <?php ... ?>.
993
994       wrap-script-literals
995
996              Type:    Boolean
997              Default: no
998              Example: y/n, yes/no, t/f, true/false, 1/0
999
1000              This  option  specifies if Tidy should line wrap string literals
1001              that appear in script attributes. Tidy wraps long script  string
1002              literals  by  inserting  a  backslash  character before the line
1003              break.
1004
1005
1006                                                     See also: wrap-attributes
1007
1008       wrap-sections
1009
1010              Type:    Boolean
1011              Default: yes
1012              Example: y/n, yes/no, t/f, true/false, 1/0
1013
1014              This option specifies if Tidy should line  wrap  text  contained
1015              within <![ ... ]> section tags.
1016
1017   Character Encoding options:
1018       ascii-chars
1019
1020              Type:    Boolean
1021              Default: no
1022              Example: y/n, yes/no, t/f, true/false, 1/0
1023
1024              Can  be  used  to modify behavior of -c (--clean yes) option. If
1025              set to "yes" when using -c, &emdash;, &rdquo;, and  other  named
1026              character entities are downgraded to their closest ascii equiva‐
1027              lents.
1028
1029
1030                                                               See also: clean
1031
1032       char-encoding
1033
1034              Type:    Encoding
1035              Default: ascii
1036              Example:  raw,  ascii,  latin0,  latin1,  utf8,  iso2022,   mac,
1037              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1038
1039              This  option specifies the character encoding Tidy uses for both
1040              the input and  output.  For  ascii,  Tidy  will  accept  Latin-1
1041              (ISO-8859-1)  character  values,  but  will use entities for all
1042              characters whose value > 127. For raw, Tidy will  output  values
1043              above  127  without  translating them into entities. For latin1,
1044              characters above 255 will be written as entities. For utf8, Tidy
1045              assumes  that both input and output is encoded as UTF-8. You can
1046              use iso2022 for files  encoded  using  the  ISO-2022  family  of
1047              encodings  e.g.  ISO-2022-JP.  For  mac  and  win1252, Tidy will
1048              accept vendor specific character values, but will  use  entities
1049              for all characters whose value > 127.
1050
1051
1052                                     See also: input-encoding, output-encoding
1053
1054       input-encoding
1055
1056              Type:    Encoding
1057              Default: latin1
1058              Example:   raw,  ascii,  latin0,  latin1,  utf8,  iso2022,  mac,
1059              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1060
1061              This option specifies the character encoding Tidy uses  for  the
1062              input. See char-encoding for more info.
1063
1064
1065                                                       See also: char-encoding
1066
1067       language
1068
1069              Type:    String
1070              Default: -
1071              Default: -
1072
1073              Currently  not used, but this option specifies the language Tidy
1074              uses (for instance "en").
1075
1076       newline
1077
1078              Type:    enum
1079              Default: Platform dependent
1080              Example: LF, CRLF, CR
1081
1082              The default is appropriate to the current platform: CRLF on  PC-
1083              DOS,  MS-Windows  and  OS/2, CR on Classic Mac OS, and LF every‐
1084              where else (Unix and Linux).
1085
1086       output-bom
1087
1088              Type:    AutoBool
1089              Default: auto
1090              Example: auto, y/n, yes/no, t/f, true/false, 1/0
1091
1092              This option specifies if Tidy should write a Unicode Byte  Order
1093              Mark  character  (BOM;  also known as Zero Width No-Break Space;
1094              has value of U+FEFF) to the beginning of the  output;  only  for
1095              UTF-8 and UTF-16 output encodings. If set to "auto", this option
1096              causes Tidy to write a BOM to the  output  only  if  a  BOM  was
1097              present  at  the beginning of the input. A BOM is always written
1098              for XML/XHTML output using UTF-16 output encodings.
1099
1100       output-encoding
1101
1102              Type:    Encoding
1103              Default: ascii
1104              Example:  raw,  ascii,  latin0,  latin1,  utf8,  iso2022,   mac,
1105              win1252, ibm858, utf16le, utf16be, utf16, big5, shiftjis
1106
1107              This  option  specifies the character encoding Tidy uses for the
1108              output. See char-encoding for more info. May only  be  different
1109              from  input-encoding for Latin encodings (ascii, latin0, latin1,
1110              mac, win1252, ibm858).
1111
1112
1113                                                       See also: char-encoding
1114
1115   Miscellaneous options:
1116       error-file
1117
1118              Type:    String
1119              Default: -
1120              Default: -
1121
1122              This option specifies the error file Tidy uses  for  errors  and
1123              warnings. Normally errors and warnings are output to "stderr".
1124
1125
1126                                                         See also: output-file
1127
1128       force-output
1129
1130              Type:    Boolean
1131              Default: no
1132              Example: y/n, yes/no, t/f, true/false, 1/0
1133
1134              This  option  specifies  if  Tidy  should produce output even if
1135              errors are encountered. Use this option  with  care  -  if  Tidy
1136              reports  an  error,  this  means Tidy was not able to, or is not
1137              sure how to, fix the error, so  the  resulting  output  may  not
1138              reflect your intention.
1139
1140       gnu-emacs
1141
1142              Type:    Boolean
1143              Default: no
1144              Example: y/n, yes/no, t/f, true/false, 1/0
1145
1146              This  option  specifies  if  Tidy  should  change the format for
1147              reporting errors and warnings to a format that  is  more  easily
1148              parsed by GNU Emacs.
1149
1150       gnu-emacs-file
1151
1152              Type:    String
1153              Default: -
1154              Default: -
1155
1156              Used internally.
1157
1158       keep-time
1159
1160              Type:    Boolean
1161              Default: no
1162              Example: y/n, yes/no, t/f, true/false, 1/0
1163
1164              This option specifies if Tidy should keep the original modifica‐
1165              tion time of files that Tidy modifies in place. The  default  is
1166              no.  Setting  the option to yes allows you to tidy files without
1167              causing these files to be uploaded to a web server when using  a
1168              tool  such  as  SiteCopy.  Note this feature is not supported on
1169              some platforms.
1170
1171       output-file
1172
1173              Type:    String
1174              Default: -
1175              Default: -
1176
1177              This option specifies the output file Tidy uses for markup. Nor‐
1178              mally markup is written to "stdout".
1179
1180
1181                                                          See also: error-file
1182
1183       quiet
1184
1185              Type:    Boolean
1186              Default: no
1187              Example: y/n, yes/no, t/f, true/false, 1/0
1188
1189              This  option  specifies if Tidy should output the summary of the
1190              numbers of errors and warnings, or the welcome or  informational
1191              messages.
1192
1193       slide-style
1194
1195              Type:    String
1196              Default: -
1197              Default: -
1198
1199              Currently not used. Tidy Classic only.
1200
1201       tidy-mark
1202
1203              Type:    Boolean
1204              Default: yes
1205              Example: y/n, yes/no, t/f, true/false, 1/0
1206
1207              This  option  specifies if Tidy should add a meta element to the
1208              document head to indicate that the  document  has  been  tidied.
1209              Tidy won't add a meta element if one is already present.
1210
1211       write-back
1212
1213              Type:    Boolean
1214              Default: no
1215              Example: y/n, yes/no, t/f, true/false, 1/0
1216
1217              This  option  specifies  if  Tidy  should  write back the tidied
1218              markup to the same file it read from. You are  advised  to  keep
1219              copies  of important files before tidying them, as on rare occa‐
1220              sions the result may not be what you expect.
1221

SEE ALSO

1223       HTML Tidy Project Page at http://tidy.sourceforge.net
1224

AUTHOR

1226       Tidy was written by Dave Raggett <dsr@w3.org>, and  is  now  maintained
1227       and  developed by the Tidy team at http://tidy.sourceforge.net/.  It is
1228       released under the MIT Licence.
1229
1230       Generated automatically with HTML Tidy released on 14 June 2007.
1231
1232
1233
1234HTML Tidy 14 June 2007   $Date: 2007/02/01 12:25:21 $                  tidy(1)
Impressum