--- id: bad87fee1348bd9aedf08816 title: Link to External Pages with Anchor Elements challengeType: 0 videoUrl: https://scrimba.com/p/pVMPUv/c8EkncB forumTopicId: 18226 localeTitle: Ссылка на внешние страницы с элементами привязки --- ## Description
Вы можете использовать элементы anchor для ссылки на контент вне вашей веб-страницы. Элементам anchor нужен адрес веб-сайта назначения, называемый атрибутом href. Им также нужен якорный текст. Вот пример: <a href="https://freecodecamp.org">this links to freecodecamp.org</a> Затем ваш браузер отобразит текст «это ссылки на freecodecamp.org» в качестве ссылки, которую вы можете щелкнуть. И эта ссылка приведет вас к веб-адресу https://www.freecodecamp.org .
## Instructions
Создайте элемент, который ссылается на и имеет «фотографии котят» в качестве его якорного текста.
## Tests
```yml tests: - text: Your a element should have the anchor text of "cat photos". testString: assert((/cat photos/gi).test($("a").text())); - text: You need an a element that links to http://freecatphotoapp.com testString: assert(/http:\/\/(www\.)?freecatphotoapp\.com/gi.test($("a").attr("href"))); - text: Make sure your a element has a closing tag. testString: assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/ ## Challenge Seed
```html

CatPhotoApp

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

A cute orange cat lying on its back. cat photos

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.

```