Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Linking Images.docx59.2 KB Linking Images - Solution.docx
59.1 KB
Quick reference
Linking Images
In this video we'll learn how to make an image clickable as a link.
When to use
Whenever you want to make an image clickable as a link.
Instructions
To make an image clickable as a link, simply wrap it in a link tag:
<a href="link.html"><img src="image.png"></a>
You can use all the regular attributes for both the link tag and the image tag.
For instance, if you want the image to be 150x200 in size and the link to open in a new web browser, you would do this:
<a href="link.html" target="_blank"><img src="image.png" width="150" height="200"></a>
Hints & tips
- <a href="link.html"><img src="image.png"></a>
- All regular attributes can be used in both the link tag and image tag.
Lesson notes are only available for subscribers.