Grokking HTML
0% completed
Turning an Image Into a Link
What happens when a link contains a picture instead of words? The picture becomes clickable. On almost every website, the logo in the top corner works this way: clicking it takes you back to the home page.
You already know both pieces. The <a> element makes a link, and the <img> element shows an image. To make an image clickable, you place the <img> element between the <a> start tag and the </a> end tag:
<a href="index.html"> <img src="images/logo.png" alt="Hillside Bakery home page" width="200" height="80"> </a>
The browser shows the logo
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%