<aside>: The Aside element

<aside> HTML 元素表示文档的一部分,其内容仅与文档的主要内容间接相关。旁白经常以侧边栏或标注框的形式出现。

¥The <aside> HTML element represents a portion of a document whose content is only indirectly related to the document's main content. Asides are frequently presented as sidebars or call-out boxes.

Try it

属性

¥Attributes

该元素仅包含 全局属性

¥This element only includes the global attributes.

使用说明

¥Usage notes

  • 不要使用 <aside> 元素来标记带括号的文本,因为此类文本被视为主流的一部分。

示例

¥Examples

使用 <aside>

¥Using <aside>

此示例使用 <aside> 来标记文章中的段落。该段仅与主要文章内容间接相关:

¥This example uses <aside> to mark up a paragraph in an article. The paragraph is only indirectly related to the main article content:

html
<article>
  <p>
    The Disney movie <cite>The Little Mermaid</cite> was first released to
    theatres in 1989.
  </p>
  <aside>
    <p>The movie earned $87 million during its initial release.</p>
  </aside>
  <p>More info about the movie…</p>
</article>

结果

¥Result

技术总结

¥Technical summary

内容类别 流量内容, 分段内容, 可触知的内容.
允许的内容 流量内容.
标签遗漏 无,开始和结束标记都是强制性的。
允许的父级 任何接受 流动内容 的元素。请注意, <aside> 元素不得是 <address> 元素的后代。
隐式 ARIA 角色 complementary
允许的 ARIA 角色 feed, none, note, presentation, region, search
DOM 接口 HTMLElement

规范

Specification
HTML Standard
# the-aside-element

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看