css - 在 HTML5 中,我应该使用文章或章节标签来制作标签吗?

标签 css html

我想为我在 HTML5 中构建的设计创建一组内容选项卡。我想知道我是否应该使用一组 <article><section>包含内容的标签?

最佳答案

<section>对我来说似乎很理想。它的definition非常巧妙地应用于内容标签之类的东西:

The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.

Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction, news items, and contact information.

记下关于 <article> 的内容不过在同一页面上:

Authors are encouraged to use the article element instead of the section element when it would make sense to syndicate the contents of the element.

因此,如果您的选项卡的内容是独立的并且在单独阅读时有意义(并且可以那样使用),请使用 <article> , 如果它不使用 <section> .

关于css - 在 HTML5 中,我应该使用文章或章节标签来制作标签吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5120757/

相关文章:

css - 尝试将 firefox 的按钮垂直居中会导致 chrome 菜单不均匀。我究竟做错了什么?

html - 输入边框在 Chrome 中显示,但在 IE 中不显示

jquery - 悬停时切换div?

javascript - 计算样式作为 JavaScript 对象

jquery - 溢出 : Hidden doesn't work

javascript - 滚动页面后的 jQuery slideUp 错误

php - 标题中未应用 CSS 样式

html - 我不明白我的导航栏(手机)

html - CSS 分页媒体内容问题

html - 悬停在其他元素上工作