当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <area>标签
Defines a region in an image map.
定义图片的热点区
In HTML the <area> tag has no end tag.
在HTML中<area>标签可以不加上关闭标签
In XHTML the <area> tag must be properly closed.
在XHTML中<area>标签必须合理关闭
This element is always nested inside a <map> tag.
这个元素应该嵌于<map>标签内
Note: The usemap attribute in <image> refers to the id or name (browser dependant) attribute in <map>, therefore we have added both the id and name attributes to <map>.
注意:在<image>里的usemap属性与<map>中的id或name属性有指示性,所以必须在<map>的属性里同时加入id和name。
源代码 | 输出结果 |
---|---|
<p>Click on one of the planets:</p> <img src ="planets.gif" | Click on one of the planets: |
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)
属性 | 值 | 描述 | DTD |
---|---|---|---|
alt | text | Specifies an alternate text for the area 为area提供替换文字 | STF |
属性 | 值 | 描述 | DTD |
---|---|---|---|
coords | if shape="rect" then if shape="circ" then if shape="poly" then | Specifies the coordinates for the clickable area 为可点击区域指定坐标范围 | STF |
href | URL | Specifies the target URL of the area 指定区域的目标URL | STF |
nohref | true false | Excludes an area from the image map 从图片热点区中排除 | STF |
shape | rect rectangle circ circle poly polygon | Defines the shape of the area 定义区域形状 | STF |
target | _blank _parent _self _top | Where to open the target URL.
| TF |
id, class, title, style, dir, lang, xml:lang, tabindex, accesskey |
For a full description, go to Standard Attributes.
查看完整描述
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onfocus, onblur |
For a full description, go to Event Attributes.
查看完整描述
Create an image map
How to create an image map, with clickable regions. Each region is a hyperlink.
为图片建立热点区,并为它们加上超级连接。