HTML5 - 文章内部 [英] HTML5 - Section inside article

查看:76
本文介绍了HTML5 - 文章内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道每个< 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屋!

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