The best HTML <area> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Differences between HTML 4.01 and HTML5,Differences between HTML and XHTML,Attributes,Global Properties,Event Properties,related articles,
With clickable image map area:
All major browsers support <area> tag.
<Area> tag defines an area inside an image map (image map refers to an image with clickable areas).
<Area> element is always nested within <map> tag inside.
NOTE: <IMG> tag usemap attribute <map> element name is associated, to create the relationship between image and map.
HTML5 provides some new attributes, and some HTML 4.01 attributes are no longer supported.
In HTML, <area> tag has no end tag.
In XHTML, <area> tag must be closed properly.
New: HTML5 new property.
属性 | 值 | 描述 |
---|---|---|
alt | text | 规定区域的替代文本。如果使用 href 属性,则该属性是必需的。 |
coords | coordinates | 规定区域的坐标。 |
href | URL | 规定区域的目标 URL。 |
hreflang New | language_code | 规定目标 URL 的语言。 |
media New | media query | 规定目标 URL 是为何种媒介/设备优化的。默认:all。 |
nohref | value | HTML5 不支持。 规定没有相关链接的区域。 |
rel New | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag |
规定当前文档与目标 URL 之间的关系。 |
shape |
default rect circle poly |
规定区域的形状。 |
target | _blank _parent _self _top framename |
规定在何处打开目标 URL。 |
type New | MIME_type | 规定目标 URL 的 MIME 类型。 注:MIME = Multipurpose Internet Mail Extensions。 |
<area> tag supports HTML global properties .
<area> tag supports HTML event properties .
HTML DOM Reference Manual: Area Objects