#todayilearned

by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

Format HTML + CSS with JS-beautify

Posted at — Jun 9, 2019

This was news to me, but: JS Beautify can beautify more than just JS. It can autoformat your CSS and HTML, including one of my favorite pathologies: wrapping + aligning attributes:

Possible values:

auto, force, force-aligned, force-expand-multiline, aligned-multiple, preserve, preserve-aligned

Or on the command-line:

-A, --wrap-attributes

Side note: there’s also a jsbeautify (no dash), which is something different. Remember the dash, js-beautify.