How to use the html formatter
- Paste your HTML.
- Choose 2 spaces, 4 spaces or tabs.
- Copy the formatted HTML.
What the formatter keeps as-is
Whitespace matters inside <pre> and <textarea>, and scripts and styles have their own syntax, so their contents are kept exactly as you wrote them. Comments and the doctype stay in place.
Examples
<nav> <a href="/">Home</a> </nav>
Stays on one line