Use the hgroup element to mark that the heading and the paragraph are related:
<hgroup>
<h2>Norway</h2>
<p>The land with the midnight sun.</p>
</hgroup>
Try it Yourself »
The <hgroup>
tag is used to surround a heading and one or more <p>
elements.
The heading inside the <hgroup>
element can be any of the <h1>
to <h6>
headings.
Note: The <hgroup>
element does not render as anything special in a browser. However, you can use CSS to style the <hgroup>
element and its content.
Element | |||||
---|---|---|---|---|---|
<hgroup> | Yes | Yes | Yes | Yes | Yes |
The <hgroup>
tag also supports the Global Attributes in HTML.
The <hgroup>
tag also supports the Event Attributes in HTML.
Heading tags: <h1> to <h6> Tags
Most browsers will display the <hgroup>
element with the following default values:
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!