title: Why <img> tag in <a> tag will have 4 px space on bottom?
body: <p>I am trying to put an image inside of  as a logo link, but there is always a 4px space on the bottom. I know I can set height 50px for  to solve the problem, but I want the height of  is depend on the . So, my question are, where is 4px space come from? And How can I solve it?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;style&gt;
        body{
          margin: 0;
          padding: 0;
        }
  
        nav{
          position: fixed;
          top: 0;
          right: 0;
          left: 0;
          background: rgba(0,0,0,0.5);
          z-index: 10;
        }
  
        a{
          text-decoration: none;
          color: black;
        }
      &lt;/style&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;nav&gt;
        &lt;a href="#"&gt;&lt;img src="Logo.png" alt="Logo" width="50" height="50"&gt;&lt;/a&gt;
      &lt;/nav&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is the result(I do not want 4px space on the bottom):
  <a href="https://i.stack.imgur.com/lmAeo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lmAeo.jpg" alt="enter image description here"></a></p>
  
  <p>Thanks Quentin this is a duplicate question, I am sorry about that. The answer is here "<a href="https://stackoverflow.com/questions/3197601/white-space-at-bottom-of-anchor-tag%22">White space at bottom of anchor tag</a>"</p>