2022-07-01 425
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> 标签必须正确地关闭。
属性
属性 | 值 | 描述 |
alt | text | 规定区域的替代文本。如果使用 href 属性,则该属性是必需的。 |
coords | coordinates | 规定区域的坐标。 |
href | URL | 规定区域的目标 URL。 |
hreflang | language_code | 规定目标 URL 的语言。 |
media | media query | 规定目标 URL 是为何种媒介/设备优化的。默认:all。 |
nohref | value | HTML5 不支持。 规定没有相关链接的区域。 |
rel | alternate | 规定当前文档与目标 URL 之间的关系。 |
author | ||
bookmark | ||
help | ||
license | ||
next | ||
nofollow | ||
noreferrer | ||
prefetch | ||
prev | ||
search | ||
tag | ||
shape | default | 规定区域的形状。 |
rect | ||
circle | ||
poly | ||
target | _blank | 规定在何处打开目标 URL。 |
_parent | ||
_self | ||
_top | ||
framename | ||
type | MIME_type | 规定目标 URL 的 MIME 类型。 |
注:MIME = Multipurpose Internet Mail Extensions。 |
全局属性
<area> 标签支持 HTML 的全局属性。
事件属性
<area> 标签支持 HTML 的事件属性。
原文链接:https://77isp.com/post/1667.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2023-01-07
网站技术 2022-11-17
网站技术 2022-11-26
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态