The easiest way to do it is via command line.
- Make sure you have tidy installed
- type
tidy -i -m <>
Note that -m
option replaces the newly tidied file with the old one. If you don't want that, you can type tidy -i -o <> <>
The -i
is for indentation. Alternatively, you can create a .tidyrc
file that has settings such as
indent: auto
indent-spaces: 2
wrap: 72
markup: yes
output-xml: no
input-xml: no
show-warnings: yes
numeric-entities: yes
quote-marks: yes
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
This way all you have to do is type tidy -o <> <>
.
For more just type man tidy
on the command line.