Тагът <area> в HTML
Дефиниция и начин на използване
Тагът <area> указва местата в картинка (картинката е изображение с полета) върху които може да се кликва.
Елементът <area> e винаги е вграден в <map> тага.
Бележка: Атрибутът „usemap“ в тагът <img> е свързан с името на елемента <map> и създава връзка между изображението и картата.
Поддръжка от браузърите
Element | |||||
---|---|---|---|---|---|
<area> | Yes | Yes | Yes | Yes | Yes |
Разлики между HTML 4.01 и HTML5
HTML5 има нови атрибути а някои от елементите на HTML 4.01 вече не се поддържат.
Разлики между HTML и XHTML
В HTML тагът <area> няма краен маркер.
В XHTML тагът <area> трябва да бъде правилно затворен.
Attributes
= New in HTML5.
Attribute | Value | Description |
---|---|---|
alt | text | Specifies an alternate text for the area. Required if the href attribute is present |
coords | coordinates | Specifies the coordinates of the area |
download | filename | Specifies that the target will be downloaded when a user clicks on the hyperlink |
href | URL | Specifies the hyperlink target for the area |
hreflang | language_code | Specifies the language of the target URL |
media | media query | Specifies what media/device the target URL is optimized for |
nohref | value | Not supported in HTML5.Specifies that an area has no associated link |
rel | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag | Specifies the relationship between the current document and the target URL |
shape | default rect circle poly | Specifies the shape of the area |
target | _blank _parent _self _top framename | Specifies where to open the target URL |
type | media_type | Specifies the media type of the target URL |
Глобални атрибути
Тагът <area> също така поддържа Глобалните Атрибути в HTML.
Event Атрибути
Тагът <area> също така поддържа Event Атрибутите в HTML.
Свързани страници
HTML DOM връзки: Area Object
Стандартни настройки за CSS
Повечето браузъри ще покажат елемента <area> със следните стандартни стойности: