Files
freeCodeCamp/guide/russian/html/attributes/a-target-attribute/index.md
2018-10-16 21:32:40 +05:30

53 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: A Target Attribute
localeTitle: Атрибут цели
---
## Атрибут цели
`<a target>` указывает, где можно открыть связанный документ в теге `a` (anchor).
#### Примеры:
Атрибут target со значением «\_blank» открывает связанный документ в новом окне или вкладке.
```html
<a href="https://www.freecodecamp.org" target="_blank">freeCodeCamp</a>
```
Атрибут target со значением «\_self» открывает связанный документ в том же фрейме, который был нажат (это значение по умолчанию и обычно не нужно указывать).
```html
<a href="https://www.freecodecamp.org" target="_self">freeCodeCamp</a>
```
```html
<a href="https://www.freecodecamp.org">freeCodeCamp</a>
```
Атрибут target со значением «\_parent» открывает связанный документ в родительском фрейме.
```html
<a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>
```
Атрибут target со значением «\_top» открывает связанный документ во всей полноте окна.
```html
<a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>
```
Атрибут target со значением _«framename»_ Открывает связанный документ в указанном именованном фрейме.
```html
<a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>
```
#### Дополнительная информация:
Атрибут цели: [w3schools](https://www.w3schools.com/tags/att_a_target.asp)