Use HTML Tidy to just indent HTML code?
Use the indent, tidy-mark, and quiet options: tidy \ -indent \ –indent-spaces 2 \ -quiet \ –tidy-mark no \ index.html Or, using a config file rather than command-line options: indent: auto indent-spaces: 2 quiet: yes tidy-mark: no Name it tidy_config.txt and save it the same directory as the .html file. Run it like this: tidy …