HTML/JS/CSS 代码压缩
将html/css/javascript代码粘贴到文本框,点击压缩即可压缩代码
- Treat attributes in case sensitive manner (useful for custom HTML tags)
- Omit attribute values from boolean attributes
- Don't leave any spaces between
display:inline;
elements when collapsing. Must be used in conjunction withcollapseWhitespace=true
- Collapse white space that contributes to text nodes in a document tree
- Always collapse to 1 space (never remove it entirely). Must be used in conjunction with
collapseWhitespace=true
- Use direct Unicode characters whenever possible
- Parse input according to HTML5 specifications
- Insert tags generated by HTML parser
- Keep the trailing slash on singleton elements
- Minify URLs in various attributes (uses
relateurl
) - Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break. Must be used in conjunction with
collapseWhitespace=true
- Process contents of conditional comments through minifier
- Comma-delimited string corresponding to types of script elements to process through minifier (e.g.
text/ng-template, text/x-handlebars-template
) - Type of quote to use for attribute values (
'
or"
) - Remove all attributes with whitespace-only values
- Remove attributes when value matches default.
- Remove
type="text/javascript"
fromscript
tags. Othertype
attribute values are left intact -
Remove
type="text/css"
fromstyle
andlink
tags. Othertype
attribute values are left intact - Remove space between attributes whenever possible. Note that this will result in invalid HTML!
- Sort style classes by frequency
- Trim white space around
ignoreCustomFragments
. - Replaces the
doctype
with the short (HTML5)doctype