DEV Community

Arnaldo Gabriel
Arnaldo Gabriel

Posted on

A Quick Way of Minifying an HTML File

Note to self

A quick way of minifying an HTML file including the <style> and <script> tags within it.

  1. Start by installing the HTML minifier with:
    npm install html-minifier -g

  2. Execute the minifier command:
    html-minifier --minify-css true --minify-js true input.htm -o output.htm

Additional options:

Top comments (1)

dpaine20 profile image
David Paine20

For the people, who want to do that process, through the online tool, they can use those links as well