Links Continued

You have probably come across an image that is also a link. For example, on YouTube, when you click on an image of a video, it takes you to the page with that video. Now let's see how to achieve this behavior.

<a href="link">
	<img src="./link/to/image" alt="">
</a>

As we can see, this behavior is very intuitive. When we want the click on an image to link somewhere, we just need to insert the image as a child of the hypertext link.

We could do the same with any HTML element. Just insert the element as a child of the hypertext link, and it works as a link.

Instructions

Insert the existing cat image as a child of the hypertext link that points to this address https://en.wikipedia.org/wiki/Domestic_cat.

Add the target attribute with the value _blank to the hypertext link to open the link in a new window.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

8/10

Links Continued | Start Coder