微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

部分vs文章HTML5

我有一个页面由各种“部分”,如视频,新闻源等组成。我有点困惑如何用HTML5来表示这些。目前我有他们作为HTML5<节>的,但是进一步检查它看起来他们更正确的标签将< article&gt ;.任何人能为我留下一些光吗? 这些东西都不是真正意义上的博客文章或“文档”,所以很难看到应用哪个元素。 干杯 编辑:我选择使用文章标签,因为它似乎是一个容器标签的不相关的元素,我猜我的“部分”是。实际的标签文章似乎是相当误导,虽然他们说HTML5已经开发出更多的考虑Web应用程序,我发现很多标签是更加以博客为中心/基于文档。 无论如何感谢你的答案,似乎是相当主观。

解决方法

听起来你应该把每一个“部分”(你称之为)包装在< article> < section>中的文章中的标签和条目。标签

HTML5 spec说(Section):

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元素而不是
节元素,当它有意义的联合的内容
元素。

并为Article

The article element represents a self-contained composition in a
document,page,application,or site and that is,in principle,
independently distributable or reusable,e.g. in syndication. This
Could be a forum post,a magazine or newspaper article,a blog entry,
a user-submitted comment,an interactive widget or gadget,or any
other independent item of content.

我认为你在OP中称为“部分”符合文章的定义,因为我可以看到他们是可独立分配或可重复使用。

更新:latest editors draft for HTML 5.1文章的一些细微文本更改(更改为斜体):

The article element represents a complete,or self-contained,
composition in a document,in
principle,independently distributable or reusable,e.g. in
syndication. This Could be a forum post,a magazine or newspaper
article,a user-submitted comment,an interactive widget
or gadget,or any other independent item of content.

此外,关于2013年JanuaryFebruary期间关于文章的公共HTML邮件列表的讨论。

原文地址:https://www.jb51.cc/html5/170373.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。