title: Make an image and text act as one in html
body: <p>So I am trying to make a dog shelter website, and I was wondering if there was a way to make both the image and the text act as one, without turning it into a table. For example, when I hover over the image the text will change still colour, as if I were hovering over the text. I am very new to HTML so it may be something very simple. Thanks.</p>
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;style&gt;
  a:link {
  color: black;
  }
  
  a:visited {
  color: black;
  }
  
  a:hover {
  color: #327da8;
  }
  
  .name {font-size:20px; font-color:black; font-family:montserrat; text-decoration:none; position:absolute; margin-top: 360px; text-align:left; border-width:1px; border-style:solid; border-color:lightgray; padding: 27.5px; border-radius:0px 0px 15px 15px;
  }
  
  a img {
          border-radius: 50%;
          display: block;
          border: none;
  }
  &lt;/style&gt;
  &lt;a href=&quot;file:///C:/Users/del0044/OneDrive/HTML%20Coding/PupLove/PupLoveNala.html&quot;&gt;&lt;img style=&quot;position:absolute; margin-top:60px; margin-left:50px; border-radius:15px 15px 0px 0px;&quot; src=&quot;https://i.pinimg.com/originals/2d/6f/8e/2d6f8ef1a4c976ce5e2a9eea5980ec92.jpg&quot; height=&quot;300&quot; width=&quot;200&quot;&gt;&lt;/a&gt;
  &lt;a class=&quot;name&quot; style=&quot;margin-left:50px;&quot; href=&quot;file:///C:/Users/del0044/OneDrive/HTML%20Coding/PupLove/PupLoveLana.html&quot;&gt;Nala &lt;br&gt;&lt;br&gt; Breed: Golden &lt;br&gt; Retriever &lt;br&gt;&lt;br&gt; Sex: Female&lt;/a&gt;
  &lt;/html&gt;
  &lt;/body&gt;
  </code></pre>
  <p>This is the code</p>