From the course: HTML and CSS: Linking
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using images as links
- [Instructor] Images may also serve as a clickable link in your website. If you're going to make an image into a link, you should also include where that link goes in your alt tag for accessibility purposes. So I'm looking at my links.html document, it's inside of the begin folder inside of 01-08 in your EXERCISE FILES. And if you scroll down to line number 25, you'll see here that I have an img tag. It has a source of oliveoil.jpg. And I have an alt tag in here that says, "Olive oil bottles. "Click to visit Two Trees Olive Oil." In other words, if somebody looking at this website clicks this image, I'm telling them where they're going to go. Remember that an image can indeed be clickable for a link, but if someone is using a screen reader to click an image, they don't see the image, they have no idea where they're going. So you need to make sure that you include that inside of your alt tag. But turning this into a link is relatively straightforward. All we're going to need to do is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
The basic link5m 33s
-
(Locked)
Linking to offsite resources4m 23s
-
(Locked)
Opening links in different windows and iframes5m 41s
-
(Locked)
Linking to PDF files and other documents6m 16s
-
(Locked)
Linking within the same document and top of page6m 25s
-
(Locked)
Linking phone numbers2m 18s
-
(Locked)
Linking to email addresses and email messages5m 12s
-
(Locked)
Using images as links2m 57s
-
(Locked)
Including several links within an image using image maps8m 7s
-
(Locked)
Links in the <head> of the document2m 41s
-
(Locked)
-
-
-