是< article>删节还可以吗? [英] Is <article> okay for truncated posts?

查看:55
本文介绍了是< article>删节还可以吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个Tumblr主题(请保留您的批评),我想使用一些语义标记(因为这似乎是大多数主题所没有的.)这些博客的样式方式是一个主页.帖子可能会被截断,也可能不会被截断.然后,您可以单击链接并获得该帖子的永久链接,或者如果该帖子被删节,则获得完整的帖子.

I'm making a Tumblr theme (hold your criticism) and I'd like to use some semantic tags (since this seems to be something most themes don't have.) The way these blogs are styled is a main page full of posts that may be truncated, and may not be. You can then click a link and get a permalink to that post, or the full post if it's truncated.

我要在主页上的这些帖子中使用< article> ,但是我不知道是否可以在<标记.我猜这没问题,因为RSS提要可以提供完整文章的链接,但是完整文章也可以使用< article> 标签?即使某些帖子非常适合联合发布,< section> 是否更适用?

I want to use <article> for these posts on the main page, but I don't know if it's okay to put a truncated post in an <article> tag. I'd guess it'd be okay since the RSS feed could supply a link to the full article, but then would the full article also use <article> tags? Is <section> more applicable, even though some posts are perfectly fit for syndication?

推荐答案

从文档中

article元素代表文档,页面,应用程序或站点中完整的,或独立的组成,并且原则上可以独立分发或重用,例如在联合组织中.这可能是论坛帖子,杂志或报纸文章,博客条目,用户提交的评论,交互式小部件或小工具,或任何其他独立的内容.

The article element represents a complete, or 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.

因此 article 不仅代表完整的文档,而且还包含文档中的独立组成,如上面的黑体字所示,这意味着删节的帖子也适合 article 元素.

So article represents not only complete, but self-contained composition in document too, as bolded above, that means, truncated posts fits article element too.

部分 ,另一方面(大胆来自我):

section元素代表文档或应用程序的通用部分.在这种情况下,一节是内容的主题分组.通常应通过将标题(h1-h6元素)作为section元素的子元素来标识每个部分的主题.

The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. The theme of each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element.

所以 section 不应直接包含帖子或其片段.

So section should not include posts or their fragments directly.

这篇关于是&lt; article&gt;删节还可以吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆