user13925890
user13925890

Reputation:

How to make an image clickable

Hello, I would like to make 2 of my images clickable: The one in my header (Kurium Header Logo) And the one in my footer (Kurium Footer Logo)

Here is my code:

HTML : https://bin.readthedocs.fr/ttilty.txt

CSS : https://bin.readthedocs.fr/ladvic.txt

If someone knows how I can do it please I'm interested

Upvotes: 1

Views: 3787

Answers (2)

CleverOscar
CleverOscar

Reputation: 135

If you want to turn any element into a hyper link you can wrap your element or string in between the a anchor tag element, inside the first a opening tag add an attribute href to the url you desire. Like so

<a href="www.url.com">  
    <img src={img.png} />
</a>

For a more detailed explanation check out

https://www.w3schools.com/tags/att_href.asp

Upvotes: 1

spacemonki
spacemonki

Reputation: 303

Just wrap an anchor around them

<a href="#"><img class="header-logo" src="img/logo.svg" alt="Kurium Header Logo" href="index.html"></a>

Upvotes: 0

Related Questions