Formatting
HTML minifier deletes comments and compresses the gaps inside tags, and it has an explicit choice about the text between tags. The default is preserve. <div>\n <p title="1 > 2">x <b> y </b></p><!-- hi --></div> becomes <div>\n <p title="1 > 2">x <b> y </b></p></div>. The comment is gone. The two spaces in the title stay. The spaces around y stay. The newline after the opening div stays, because preserve means the text nodes are not collapsed.
The other setting, collapse outside preformatted elements, is the one that pulls ordinary text whitespace down. pre keeps its contents either way. Attribute values are never edited: the > and the double space inside title="1 > 2" are significant and stay. Conditional comments that start like <!--[if, and server-side <!--# comments, are kept because removing them changes what a legacy page or a server does.
The formatter indents and does not take this whitespace control. Use that page when you want to read the tree. Use this one when the comment and the extra gaps are the problem.
Text whitespace preserve. <div>\n <p title="1 > 2">x <b> y </b></p><!-- hi --></div>
<div>\n <p title="1 > 2">x <b> y </b></p></div>
Preserve is the default so a first run does not glue words together. Collapse is a separate choice.
Text whitespace was preserve. Collapse outside preformatted elements is the setting that reduces those gaps. pre is left alone in both modes.
No. title="1 > 2" keeps the > and both spaces. Only the separators between attributes are compressed.
Ordinary comments go. A comment that starts as a conditional <!--[if, an endif marker, or a <!--# server comment is kept.
The HTML formatter pretty-prints with two spaces and does not offer this whitespace control.