--- id: bad87fee1348bd9aedf08820 title: Turn an Image into a Link challengeType: 0 videoUrl: '' localeTitle: 将图像转换为链接 --- ## Description
您可以通过嵌套在他们做出元素融入链接a元素。鸟巢的内部图像a元素。这是一个例子: <a href="#"><img src="https://bit.ly/fcc-running-cats" alt="Three kittens running towards the camera."></a>记得使用#为你的a元素的href为了把它变成一个死链接属性。
## Instructions
将现有图像元素放在锚元素中。完成此操作后,使用光标将鼠标悬停在图像上。光标的正常指针应该成为链接点击指针。这张照片现在是一个链接。
## Tests
```yml tests: - text: 巢现有img一个内元件a元件。 testString: 'assert($("a").children("img").length > 0, "Nest the existing img element within an a element.");' - text: '您a元素应该是href属性设置为#的死链接。' 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: 确保每个的a元素具有一个结束标记。 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
```js // solution required ```