i've experienced situations where i prefer to work around using an html img tag.
the above answers are either bloated (extra) and or don't work.
a zero html is not exactly possible, but you can style your @import link into your css console or whatever you want to call it, and call your header id. but you are going to be limited by the section of the page.
like this:
@import url('https://yourdestinationlink.com');
then in css
#header a[href='https://yourdestinationlink.com'] {
display: flex;
position: absolute;
}
.aside a[href='yourdestination.com'] {
background-image: url('https://yourimage.com');
}
or you can link tag your destination link into your html head and reference as above in yor css,
like this:
<link src='https://yourdestinationlink.com'/>
another clean option is to create a div to contain your anchor tag that will hold the image you want to turn into a link.
first, create a container div. then, put an anchor tag in that div. href your destination link in the anchor. in css, use background-image to style (insert) your image into the anchor.
like this:
put your anchor tag in a div and put your destination link into the anchor's href
<div class="image-container">
<a href="https://yourdestinationlink.com"></a>
</div>
in css
.image-container a {
background-image: url('https://yourimage.com');
}
or assign your anchor a class name and style that, like this:
<div class="image-container">
<a class="image-link" href="https://yourdestinationlink.com"></a>
</div>
.image-link {
background-image: url('https://yourimage.com');
}