Minification (or compression) of an HTML document is the practice of removing unnecessary white spaces, without affecting the functionality of the document, but significantly reducing the loading time in Web browsers. While a minified HTML document gains in terms of execution performance, it is more difficult to read.
To minify an HTML document, right-click anywhere in the editor for an HTML document that is open in Text mode (or right-click an HTML document in the Project Explorer view and select the Minify HTML action. This opens a dialog box with the following options:
When you click OK, the resulting HTML document is a compressed version of the original file for the purpose of enhanced performance, while losing some readability. The source HTML document is not affected.