- 0133技术站
- 联系QQ:88526
- QQ交流群

- 微信公众号

指明链接资源的语言类型, 值的范围参考BCP47,这个属性只能在指明href属性之后使用.
所有主流浏览器都支持 hreflang 属性。
hreflang 属性是HTML5 <area>标签新增的属性。
<area hreflang="language_code">
值 | 描述 |
language_code | 双字符的语言代码,指定被链接文档的语言。如需查看所有可用的语言代码,请访问我们的 语言代码集参考手册。 |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>点击太阳或其他行星,注意变化:</p> <img src="http://ss.0133.cn/upload/image/885/902/932/1553322045901285.gif" width="145" height="126" alt="Planets" usemap="#planetmap"> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" alt="Sun" href="https://public.xp.cn/down/course_demo/html/area_tabs/sun.htm"> <area shape="circle" coords="90,58,3" alt="Mercury" href="https://public.xp.cn/down/course_demo/html/area_tabs/mercur.htm"> <area shape="circle" coords="124,58,8" alt="Venus" href="https://public.xp.cn/down/course_demo/html/area_tabs/venus.htm"> </map> </body> </html>
点击 "运行实例" 按钮查看在线实例
推荐手册