--- id: bad87fee1348bd9aedf08820 title: Turn an Image into a Link challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cRdBnUr' --- ## Description
You can make elements into links by nesting them within an a element. Nest your image within an a element. Here's an example: <a href="#"><img src="https://bit.ly/fcc-running-cats" alt="Three kittens running towards the camera."></a> Remember to use # as your a element's href property in order to turn it into a dead link.
## Instructions
Place the existing image element within an a (anchor) element. Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link.
## Tests
```yml tests: - text: Nest the existing img element within an a element. testString: assert($("a").children("img").length > 0, 'Nest the existing img element within an a element.'); - text: Your a element should be a dead link with a href attribute set to #. testString: assert(new RegExp("#").test($("a").children("img").parent().attr("href")), 'Your a element should be a dead link with a href attribute set to #.'); - text: Make sure each of your a elements has a closing tag. testString: assert(code.match(/<\/a>/g) && code.match(//g).length === code.match(/a elements has a closing tag.'); ```
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

```
## Solution
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

```