本文介绍了我何时将< h1> - < h6>在< header>内部元件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
何时将标题放在标题
元素内?我无法理解,有时在我看来,每个标题必须在标题
标签之间。
When do I put headings inside a header
element? I can't understand it, sometimes it seems to me that each heading has to be between header
tags.
让我们以这个边栏为例:
Let's take this sidebar as example :
如何编码?
How to code it?
<aside>
<header>
<h1>How to format</h1>
</header>
</aside>
或
<aside>
<h1>How to format</h1>
</aside>
推荐答案
请参阅元素:
See the specification of the header
element:
因此,您可以在页面中拥有多个页眉元素(不限于页面的顶部),您可以在标题中使用它,但它是可选的。这意味着你的两个例子都是正确的。
So you can have many header elements in a page (it's not limited to the top of the page), and you can use it around headings, but it's optional. This means both of your examples are correct.
这篇关于我何时将< h1> - < h6>在< header>内部元件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!