Working with CMS exports, server-rendered fragments, or minified email templates makes it difficult to spot where container elements open and close. Running the markup through js-beautify restores visual hierarchy across WHATWG HTML Living Standard block and container elements.
For example, formatting <section class="hero"><div class="inner"><h1>Welcome</h1><p>Start reading below.</p></div></section> with 2-space indentation produces:
<section class="hero">
<div class="inner">
<h1>Welcome</h1>
<p>Start reading below.</p>
</div>
</section>
This makes the parent-child relationship between <section>, <div>, and the inner typography elements immediately visible while properly handling self-closing void tags such as <img>, <input>, <meta>, and <link>.