HTML5 中 card/card-container 的元素?

Element for a card/card-container in HTML5?

article 元素的规范说:

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.

因此,如果我正在构建一个网站,在该网站的主页中,我有可点击的卡片并引导您进入文章页面,那么从语义上来说,如果这张卡片是 sectionarticle 元素?

post 预告片可以适当使用 article 元素。这取决于您显示的内容。例如:

  • :如果显示标题、描述、图像、作者姓名和出版日期,则绝对应该使用 article 元素。
  • :如果您只显示标题,则 article 元素将没有必要,因为每个预告片都会成为文档大纲中的一个条目(如article 是一个分段内容元素),但如果大纲条目不包含任何其他内容,则没有多大意义。
  • 可能:介于两者之间。标题和日期?可能不会。标题和描述?应该是吧。

如果您决定使用 article(而且只有这样!),您可以使用 bookmark link type 作为 link 到完整的文章页面。这可能暗示您的 article 不是 "full thing".

如果您决定不使用 article,请不要使用 section。如果在 articlesection 之间进行选择,article 是预告片的正确选择。但是,如果 article 不合适,则不应使用其他分段内容元素,而应使用诸如 p and/or ul 之类的元素(并且没有标题元素)。