So I’d like to use some icon images for my site navigation. Currently I’m doing the following using the HTML5 Nav tag
<nav>
<a href="index.html"><img src="images/whatever.png"/></a>
<a href="dash.html"><img src="images/whatever.png"/></a>
</nav>
For best practices I’d prefer not to have images in the html so I’m wondering if the correct way around this would be to give each link a pseudo class like;
<nav>
<a class="home" href="index.html"></a>
<a class ="dash" href="dash.html"></a>
</nav>
And then give each link a background image like;
.home {
background-image: url(../whatever.png);
}
You could do it like this:
with the css like this: