Stripping the Bloat
When developers write HTML, they use indentation, line breaks, and comments for readability. Browsers, however, do not need any of that whitespace to render the page.
Performance Gains
Minifying HTML strips out all unnecessary characters. For large DOM structures, this can reduce the file size significantly, improving the critical rendering path.