title: How to vertically align image with text
body: <p>I'm making my first website, but i can't make the icon to vertically align with the text</p>
  
  <p>if i used Font Awesome icons it works great, but i don't want to use it.</p>
  
  <p>here is my code and the image to better describe my problem.</p>
  
  <p>"Can't align the arrow icon with text" Image</p>
  
  <p><a href="https://i.stack.imgur.com/9o9Fq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9o9Fq.png" alt="enter image description here"></a></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-css lang-css prettyprint-override"><code>.icon {
    width: 20px;
    height: 20px;
    padding-left: 10px;
    margin-right: -12px;
  }
  
  .link {
    display: block;
    text-decoration: none;
    font-size: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  .leftDiv {
    width: 200px;
    height: 100%;
    background-color: lightgray;
    padding-top: 10px;
    box-shadow: rgba(0, 0, 0, 0.5) 3px 0px 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;title&gt;Nature Gallery&lt;/title&gt;
    &lt;link rel="shortcut icon" href="Icon/NG.png" /&gt;
    &lt;link href="Style/StyleSheet1.css" rel="stylesheet" /&gt;
    &lt;link href="Content/font-awesome.css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="leftDiv"&gt;
      &lt;a href="Home.html" class="link"&gt;
        &lt;i class="fa fa-long-arrow-right"&gt;&lt;/i&gt; Home
      &lt;/a&gt;
  
      &lt;a href="Home.html" class="link"&gt;
        &lt;img src="Icon/long-arrow-alt-right-solid.svg" class="icon" /&gt; Home
      &lt;/a&gt;
  
      &lt;a href="Home.html" class="link"&gt;
        &lt;img src="Icon/long-arrow-alt-right-solid.svg" class="icon" style="vertical-align:middle;" /&gt; Home
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>