我想为我在 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/