--- id: bad88fee1348bd9aedf08816 title: Link to Internal Sections of a Page with Anchor Elements challengeType: 0 videoUrl: '' localeTitle: Ссылка на внутренние разделы страницы с элементами привязки --- ## Description
Элементы привязки также могут использоваться для создания внутренних ссылок для перехода к различным разделам веб-страницы. Чтобы создать внутреннюю ссылку, вы назначаете атрибут href ссылки на хэш-символ # плюс значение атрибута id для элемента, к которому вы хотите внутренне связать, обычно дальше вниз по странице. Затем вам нужно добавить тот же атрибут id к элементу, к которому вы привязываетесь. id - это атрибут, который однозначно описывает элемент. Ниже приведен пример внутренней привязной ссылки и ее целевого элемента:
<a href="#contacts-header"> Контакты </a>
...
<h2 id = "contacts-header"> Контакты </ h2>
Когда пользователи нажимают ссылку «Контакты», они будут отправлены в раздел веб-страницы с элементом заголовка « Контакты» .
## Instructions
Измените внешнюю ссылку на внутреннюю ссылку, изменив атрибут href на «#footer» и текст «Фотографии кошки» на «Перейти к нижнему». Удалите атрибут target="_blank" из тега привязки, поскольку это заставляет связанный документ открываться на вкладке нового окна. Затем добавьте атрибут id со значением «footer» в элемент <footer> в нижней части страницы.
## Tests
```yml tests: - text: На вашей странице должен быть только один тег привязки. testString: 'assert($("a").length == 1, "There should be only one anchor tag on your page.");' - text: На вашей странице должен быть только один footer тег. testString: 'assert($("footer").length == 1, "There should be only one footer tag on your page.");' - text: 'Тег a должен иметь атрибут href установленный на «#footer».' testString: 'assert($("a").eq(0).attr("href") == "#footer", "The a tag should have an href attribute set to "#footer".");' - text: Тег a должен не иметь target атрибута testString: 'assert(typeof $("a").eq(0).attr("target") == typeof undefined || $("a").eq(0).attr("target") == true, "The a tag should not have a target attribute");' - text: Текст должен быть «Перейти к низу». a testString: 'assert($("a").eq(0).text().match(/Jump to Bottom/gi), "The a text should be "Jump to Bottom".");' - text: Тег footer должен иметь атрибут id установленный в «нижний колонтитул». testString: 'assert($("footer").eq(0).attr("id") == "footer", "The footer tag should have an id attribute set to "footer".");' ```
## 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. 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. 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.

Meowwww loved it, hated it, loved it, hated it yet spill litter box, scratch at owner, destroy all furniture, especially couch or lay on arms while you're using the keyboard. Missing until dinner time toy mouse squeak roll over. With tail in the air lounge in doorway. Man running from cops stops to pet cats, goes to jail.

Intently stare at the same spot poop in the plant pot but kitten is playing with dead mouse. Get video posted to internet for chasing red dot leave fur on owners clothes meow to be let out and mesmerizing birds leave fur on owners clothes or favor packaging over toy so purr for no reason. Meow to be let out play time intently sniff hand run outside as soon as door open yet destroy couch.

```
## Solution
```js // solution required ```