HTML <area> 标签


实例 带有可点击区域的图像映射:

<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
  <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

标签定义及使用说明

<area> 标签定义图像映射内部的区域(图像映射指的是带有可点击区域的图像)。

<area> 元素始终嵌套在 <map> 标签内部。

注释: <img> 标签中的 usemap 属性与 <map> 元素中的 name 相关联,以创建图像与映射之间的关系。

HTML 4.01 与 HTML5之间的差异

HTML5 提供了一些新属性,同时不再支持 HTML 4.01 中的某些属性。

HTML 与 XHTML 之间的差异

在 HTML 中,<area> 标签没有结束标签。

在 XHTML 中,<area> 标签必须正确地关闭。


原文链接:https://codingdict.com/