是否有HTML5标记表示文章预览? [英] Is there an HTML5 tag to signify an article preview?

查看:118
本文介绍了是否有HTML5标记表示文章预览?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文章元素的描述如下:


article元素表示由
a self组成的页面的一个组件文档,页面,应用程序或站点
中包含的组合,可以独立分发或重复使用,
eg在联合组织中。这可以是论坛帖子,杂志或
报纸文章,博客条目,用户提交的评论,
交互式小部件或小工具,或任何其他
内容的独立项目。 / p>

The article element represents a component of a page that consists of a self-contained composition in a document, page, application, or site and that is intended to be 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.

但是,我有兴趣展示一些将包含在文章元素中的内容的预览。它不是文章本身,而是文章的链接,包含内容的一些。是否有一种语法方式在HTML5中表达这一点,或div是否合适?

However, I'm interested in showing a preview of some content that will be wrapped in an article element. It isn't the article itself, but is a link to the article and contains some of the content. Is there a semantic way of expressing this in HTML5, or would divs be appropriate?

推荐答案

没有专门用于预览的HTML5标签摘录。

There is no HTML5 tag specifically for preview excerpts.

可以说,文章的摘要是一个独立的,可能可重复使用/可以联合使用的内容,所以你可能会很好用< a href =http://dev.w3.org/html5/spec-author-view/the-article-element.html#the-article-element =nofollow> <文章>

Arguably, a summary of an article is a self-contained, potentially-reusable/syndicate-able bit of content, so you’d probably be fine using <article> for it.

否则,< div> 总是很好,但你可以考虑< section> 或一个列表,具体取决于上下文。

Otherwise, <div> is always fine, although you might consider <section> or a list depending on the context.

标记在实际的预览文本中,你可以使用 < blockquote> ,因为你引用了这篇文章。

To mark up the actual preview text, you could use <blockquote>, as you’re quoting the article.

这篇关于是否有HTML5标记表示文章预览?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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