How to save a html element as a png
<p>Not a duplicate as I need to convert to a html canvas, not from one</p>

<hr>

<p>I am developing a site that puts some elements on the screen.</p>

<p>I need to be able to capture the content of a <code>&lt;div&gt;</code> in a png</p>

<p>I have tried some chrome extensions but none worked unfortunately</p>

<pre><code>            &lt;style type="text/css"&gt;
            * {
                margin: 0px 0px;
                padding: 0px 0px;
            }
            #box {
                background: #FFFF00;
                width: 100px;
                height: 50px;
            }
            &lt;/style&gt;
            &lt;div id="box"&gt;
            This is my box :)
            &lt;/box&gt;
</code></pre>