Height of div is greater than image
<p>I am a rookie for front-end development. Recently, I wrote codes like:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div style="background-color:red"&gt;
        &lt;img src='https://www.logaster.com/blog/wp-content/uploads/2013/06/jpg.png'&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>The height of image(logo.jpg) is 80px, but the height of div is 82px. Why?</p>