HTML5 - 文章内部 [英] HTML5 - Section inside article
问题描述
我知道每个< section>
必须包含< h1>
,但如果我放了一个< section>
在< article>
中,我必须在<节>
? < h1>
或< h2>
?
I know that every <section>
must contain an <h1>
, but if I put a <section>
inside an <article>
, what do I have to use inside the <section>
? <h1>
or <h2>
?
详细地说,我的文章是一篇博客文章,该部分是文章的相关内容,如视频或一组图像(图库)。
In detail, my article is a blog entry, and the section is the "related content of the article", like a video or a set of images (gallery).
谢谢
推荐答案
部分不一定包含< h1>
,虽然它们肯定有助于安排你的内容并赋予它语义含义。
A section doesn't necessarily contain an <h1>
, though they certainly help arrange your content and give it semantic meaning.
如果我有你所描述的结构,我肯定会使用正常的< h1> - < h6>
进展到我的单据的结构:
If I had the structure you are describing, I would certainly use the normal <h1>-<h6>
progression to structure my document:
<article>
<h1>...</h1>
<p>...</p>
<section id="related-content">
<h1>Related Content<h1>
<h2>Video</h2>
<p>...</p>
<h2>Gallery</h2>
<p>...</p>
</section>
<section id="another-section">
<h1>Another amazing section!<h1>
<h2>...</h2>
<p>...</p>
<h2>...</h2>
</section>
</article>
与往常一样,如果有疑问,验证您的加价: http://validator.w3.org/
As always, when in doubt, validate your markup: http://validator.w3.org/
这篇关于HTML5 - 文章内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!