Speed test Minify HTML

Minify HTML

Compacting HTML code, including any inline JavaScript and CSS contained in it, can save many bytes of data and speed up downloading, parsing, and execution time.

For example, if you have a list of items marked up as <li>List item</li>, you could instead just write <li>List item.
Or instead of a paragraph that you’d usually close with </p>, you could just use <p>My paragraph.
This even works with html, head, and body, which are not required in HTML.

Before

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>Google website optimization</title>
<meta name='Description' content='Google website optimization, minify HTML' />
<meta name='Keywords' content='google, website, optimization, minify HTML' />
<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' href='http://www.domain.com/meni.css' type='text/css' media='all' />
<link rel='shortcut icon' href='http://www.domain.com/favicon.ico' />
</head>
<body>

<ul>
<li>list items</li>
<li>list items</li>
<li>list items</li>
</ul>

<p>paragraph</p>
<p>paragraph</p>
<p>paragraph</p>

<a href='link.html' title='Link'>Link</a>
<a href='link.html' title='Link'>Link</a>
<a href='link.html' title='Link'>Link</a>

text<br />
text<br />
text<br />

<script type='text/javascript' src='plugin1.js'></script>
<script type='text/javascript' src='plugin2.js'></script>
</body>
</html>

After - Minifying the following HTML resources could reduce their size by 436B (43% reduction).

<!DOCTYPE html>
<title>Google website optimization</title>
<meta content='Google website optimization' name=Description>
<meta content='google, website, optimization' name=Keywords>
<meta charset=utf-8>
<link href=meni.css media=all rel=stylesheet type=text/css>
<link href=favicon.ico rel='shortcut icon'>
<body>
<ul>
<li>list items
<li>list items
<li>list items
</ul>
<p>paragraph
<p>paragraph
<p>paragraph
<a href=link.html title=Link>Link</a>
<a href=link.html title=Link>Link</a>
<a href=link.html title=Link>Link</a>
text<br>
text<br>
text<br>
<script src=plugin1+2.js></script>