tidy
Clean up and pretty print HTML, XHTML, and XML files. tldr-pages
On several platforms
Several platforms
Clean up and pretty print HTML, XHTML, and XML files. Note: tidy cannot preserve original indentation.
Pretty print an HTML file
tidy path/to/file.htmlIdentifyEnable indentation, wrapping lines in 100, saving to output.html
tidy --indent y --wrap 100 -output path/to/output.html path/to/file.htmlIdentifyModify an HTML file in-place using a configuration file
tidy -config path/to/configuration -modify path/to/file.htmlIdentify