Is HTML pretty print the same as HTML formatting?
Yes — they are two names for the same operation. The HTML Formatter at /html-formatter and this pretty-print page run identical algorithms. We host both URLs because both terms have search demand. Treat the formatter URL as canonical for bookmarks; treat this page as a synonym.
What indent depths can I choose?
Three options: 2 spaces (default — modern convention used by Prettier and most JS frameworks), 4 spaces (traditional, common in PHP/WordPress codebases), and tab (one indent character per level — works with editors that render tabs at any width).
Does pretty printing wrap long lines?
It places each tag on its own line — that is the wrap. It does not enforce a column-width limit on text inside elements (e.g. it will not split a long paragraph at 80 chars). For column-bound wrapping use a code formatter like Prettier with HTML support.
Will it normalize attribute quote style?
No. Single quotes, double quotes, and unquoted attribute values are all preserved exactly as written. The pretty printer does not rewrite attributes — only inter-tag whitespace is changed.
How does it handle <pre> and <textarea>?
Both elements have whitespace-significant content. The pretty printer indents the opening and closing tags but the text between them keeps its existing newlines and spaces — re-indenting them would break visible output.
Can I pretty-print an HTML fragment without a full document?
Yes. Paste any partial — a component template, an email body fragment, a portlet snippet — and it will be indented relative to its own root. No <html> or <body> wrapper is required.
Does it preserve the DOCTYPE?
Yes. <!DOCTYPE html> (and the rare legacy doctypes) are emitted on their own line at indent level 0, preceding the <html> root. The pretty printer does not invent or remove a DOCTYPE.
Does pretty-printing change file size?
Yes — output is larger than input because newlines and indent characters are added. This is fine for source files and version control. For production deployment, run the HTML Minifier on the formatted source instead of shipping the pretty version.