--- id: bad87fee1348bd9aede08817 title: Nest an Anchor Element within a Paragraph challengeType: 0 videoUrl: '' localeTitle: Гнездо анкерного элемента в абзаце --- ## Description
Вы можете вставлять ссылки в другие текстовые элементы.
<Р>
Вот вам ссылка <a target="_blank" href="http://freecodecamp.org"> на freecodecamp.org </a> для вас.
</ Р>
Давайте разберем пример: Обычный текст завернут в элемент p :
<p> Here's a ... for you to follow. </p> Следующий элемент anchor <a> (для которого требуется закрывающий тег </a> ):
<a> ... </a> target - это атрибут тега привязки, который указывает, где можно открыть ссылку, а значение "_blank" указывает на открытие ссылки на новой вкладке. href является атрибутом тега привязки, который содержит URL-адрес связь:
<a href="http://freecodecamp.org"> ... </a> В тексте, «ссылка на freecodecamp.org» , в элементе anchor text , который называется anchor text , будет отображаться ссылка:
<a href=" ... ">link to freecodecamp.org</a> Окончательный результат примера будет выглядеть так:

Вот ссылка на freecodecamp.org для вас.

## Instructions
Теперь гнездо уже существующий a элемент в новом p элемент (только после того, как существующего main элемента). В новом абзаце должен быть текст с надписью «Просмотр фотографий кошек», где «фотографии кошек» - это ссылка, а остальная часть текста - простой текст.
## Tests
```yml tests: - text: 'Вам нужно a элемент , который связывает с «http://freecatphotoapp.com».' testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").length > 0 || $("a[href=\"http://www.freecatphotoapp.com\"]").length > 0), "You need an a element that links to "http://freecatphotoapp.com".");' - text: Ваш элемент должен иметь якорный текст «кошачьи фотографии» a testString: 'assert($("a").text().match(/cat\sphotos/gi), "Your a element should have the anchor text of "cat photos"");' - text: 'Создать новый p элемент вокруг вашего a элементе. Там должно быть , по крайней мере , 3 всего p теги в вашем HTML коде.' testString: 'assert($("p") && $("p").length > 2, "Create a new p element around your a element. There should be at least 3 total p tags in your HTML code.");' - text: Ваш элемент должен быть вложен в вашем новом a p элемент. testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().is("p") || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().is("p")), "Your a element should be nested within your new p element.");' - text: Ваш элемент p должен иметь текст «Просмотреть больше» (с пробелом после него). testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi) || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi)), "Your p element should have the text "View more " (with a space after it).");' - text: Ваш элемент не должен иметь текст «Больше». a testString: 'assert(!$("a").text().match(/View\smore/gi), "Your a element should not have the text "View more".");' - text: 'Убедитесь, что каждый из ваших p элементов имеет закрывающий тег.' testString: 'assert(code.match(/<\/p>/g) && code.match(/

/g).length === code.match(/

p elements has a closing tag.");' - text: 'Убедитесь , что каждый из ваших a элементы закрывающий тег.' testString: 'assert(code.match(/<\/a>/g) && code.match(//g).length === code.match(/a elements has a closing tag.");' ```

## Challenge Seed
```html

CatPhotoApp

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 ```