Created 11/1999

Using Tidy under Windows


Quick and Dirty Instructions

  1. Read about Tidy at
  2. Download the DOS executable from
  3. Place it in your system folder; typically C:\Windows\
  4. Start -> Programs -> MS-DOS Prompt
  5. Navigate, in DOS, to where you want to
  6. Make a backup of your files!
  7. You can now execute Tidy Statements - to manipulate files

The full list of options you can set with HTML Tidy

  -config file        read config file
  -indent or -i       indent element content
  -omit or -o         omit optional endtags
  -wrap 72            wrap text at column 72 (default is 68)
  -upper or -u        force tags to upper case (default is lower)
  -clean or -c        replace font, nobr & center tags by CSS
  -raw                don't o/p entities for chars 128 to 255
  -ascii              use ASCII for output, Latin-1 for input
  -latin1             use Latin-1 for both input and output
  -utf8               use UTF-8 for both input and output
  -iso2022            use ISO2022 for both input and output
  -numeric or -n      output numeric rather than named entities
  -modify or -m       to modify original files
  -errors or -e       show only error messages
  -quiet or -q        suppress non-essential output
  -f file             write errors to file
  -xml                use this when input is in XML
  -asxml              to convert HTML to XML
  -slides             to burst into slides on h2 elements
  -help               list command line options

                     |  *Tidy Commands in Red                           |
                     |  *Files in Blue                                  |
                     |  *Explanations in Black                          |

So what does this look like on the DOS Command Line

C:\WINDOWS\Desktop>tidy -i -m -wrap 400 -upper -f errors.txt foo.html
                   This is the actual HTML Tidy Command Line Statement

Oh yeah? Well whazzat mean?

C:\WINDOWS\Desktop>    The DOS Prompt - in this case this is the desktop.
  tidy                 call Tidy (Tidy wants to live C:\Windows to work)
  -i                   Cause resulting page to have indenting
  -m                   Modifies the document in place
                       (Backups are advisable)
  -wrap 400            Tidy wraps by default at 68 characters - here we
                       specify wrapping at 400
  -upper               Makes the tags themselves UPPERCASE
  -f errors.txt        Log errors into a file called errors.txt which
                       will be placed in the same directory).
  foo.html             The file tidy will work on and modify.

Parting Words

HTML Tidy is *very* cool, and very powerful. I advise caution in using this files, there are no built in "undo" features in Tidy - but it's a nice tool if you're faced with grotesque pages.