试一试
<hgroup>
<h1>Frankenstein</h1>
<p>Or: The Modern Prometheus</p>
</hgroup>
<p>
Victor Frankenstein, a Swiss scientist, has a great ambition: to create
intelligent life. But when his creature first stirs, he realizes he has made a
monster. A monster which, abandoned by his master and shunned by everyone who
sees it, follows Dr Frankenstein to the very ends of the earth.
</p>
hgroup {
text-align: right;
padding-right: 16px;
border-right: 10px solid #00c8d7;
}
hgroup h1 {
margin-bottom: 0;
}
hgroup p {
margin: 0;
font-weight: bold;
}
属性
此元素仅包含全局属性。
用法说明
<hgroup> 元素允许将标题与任何辅助内容分组,例如副标题、替代标题或标语。这些类型的内容中的每一种都表示为 <hgroup> 中的 <p> 元素。
<hgroup> 本身对网页的文档大纲没有影响。相反,<hgroup> 中允许的单个标题会影响文档大纲。
示例
html
<!doctype html>
<title>HTML Standard</title>
<body>
<hgroup id="document-title">
<h1>HTML: Living Standard</h1>
<p>Last Updated 12 July 2022</p>
</hgroup>
<p>Some intro to the document.</p>
<h2>Table of contents</h2>
<ol id="toc">
…
</ol>
<h2>First section</h2>
<p>Some intro to the first section.</p>
</body>
结果
技术摘要
规范
| 规范 |
|---|
| HTML # the-hgroup-element |
浏览器兼容性
加载中…