HTML5 role attribute for tags(标签的 HTML5 角色属性)
问题描述
我的 HTML5 模板在页面左上角的每个页面(我用于关键字)上都有 h1 元素.
My HTML5 template has h1 elements on every page (that I use for keyword) on top left part of the page.
是否有一个 role 属性可以将它们标记为类似于 WorPress 中的标签的标签?
Is there a role attribute to sign them as tags like the tags in WorPress?
推荐答案
根据 W3C 的定义,您可以将此值用于 role 属性:
As defined by W3C, you can use this values for role attribute:
横幅补充内容信息定义主要导航注释搜索
contentinfo 目的是提供有关内容的元信息,因此可用于标签管理.也就是说,<h1> 不应该用作标签,因为它的主要目的是明确描述整个页面
contentinfo purpose is to provide meta information about the content, so it could be used for tag management. That said, <h1> shouldn't be used as tags, as it's main purpose is to explicitly describe the whole page
来源
这篇关于标签的 HTML5 角色属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:标签的 HTML5 角色属性
基础教程推荐
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
