Remove commentsConditional comments are left intact, but their inner (insignificant) whitespace is removed.
Also remove comments from scripts and styles
Remove CDATA sections from scripts and styles
Collapse whitespace
Conservative whitespace collapse
Collapse boolean attributes
e.g. <... disabled="disabled"> → <... disabled>
Remove attribute quotes
e.g. <p class="foo"> → <p class=foo>
Remove redundant attributes/values
<script language="Javascript" ...>
<form method="get" ...>
<input type="text" ...>
<script src="/..." charset="...">
<a id="..." name="...">
<... onclick="javascript:..." ...>
Use short doctypei.e. <!DOCTYPE html>
Remove empty (or blank) attributes
Valid attributes are: class, id, style, title, lang, dir, event attributes
Remove optional tags
Currently, only:
</html>
,
</head>
,
</body>
,
</option>
</thead>
,
</tbody>
,
</tfoot>
,
and
</tr>
Remove ignored tags
Currently, only tags starting and ending with:
<% ... %>
and
<? ... ?>
All except textarea
Remove type="text/javascript"
from script
's
Values other than "text/javascript" (e.g. "text/vbscript") are left intact.
Remove type="text/css"
from style
's and link
's
Values other than "text/css" (e.g. "text/plain" or "application/atom+xml") are left intact.
Case-sensitive attributes
Useful when minifying SVG
Keep closing slash
Useful when minifying SVG
Minify JS
Minify CSS
Validate input through HTML lint