How do I get rid of these blue squares

Viewed 27

I added an a tag so these images could be links and it added those weird blue things showed up. how do I get rid of them?

enter image description here

my code looks like this:

<a href="https://www.github.com/example" target="_blank">
   <img src="images/Icons/github.png" alt="Github" >
</a>
<a href="https://example.itch.io" target="_blank">
   <img src="images/Icons/itchio.png" alt="Itch.io">
</a>
3 Answers

You can use CSS to remove the underline for the anchors (that browsers display by default).

a {
    text-decoration: none;
}

In your CSS file add text-decoration: none; to your anchor tags

Like so:

a { 
text-decoration: none;
}

I bet that will fix it.

It would probably be a good idea to give those link tags a class name like the following and then target them:

<a href="https://www.github.com/example" class="social-links" target="_blank">
   <img src="images/Icons/github.png" alt="Github" >
</a>
<a href="https://example.itch.io" class="social-links" target="_blank">
   <img src="images/Icons/itchio.png" alt="Itch.io">
</a>

Then in your css do this:

a.social-links {
   text-decoration: none;
}
Related