<aside>:Aside 元素
<aside> HTML 元素表示文件的一部分,其內容與文件的主要內容僅間接相關。Aside 通常以側邊欄或彈出框的形式呈現。
試一試
屬性
此元素僅包含 全域性屬性。
用法說明
- 不要使用
<aside>元素來標記括號內的文字,因為此類文字被認為是主流程的一部分。
示例
使用 <aside>
此示例使用 <aside> 來標記文章中的一個段落。該段落與文章的主要內容僅間接相關
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>
結果
技術摘要
| 內容類別 | 流內容(Flow content)、分節內容(sectioning content)、可感知內容(palpable content)。 |
|---|---|
| 允許的內容 | 流內容. |
| 標籤省略 | 無,起始標籤和結束標籤都是必須的。 |
| 允許的父元素 | 任何接受流內容的元素。請注意,<aside>元素不能是<address>元素的後代。 |
| 隱式 ARIA 角色 | 補充 |
| 允許的 ARIA 角色 |
feed、none、note、presentation、region、search |
| DOM 介面 | HTMLElement |
規範
| 規範 |
|---|
| HTML 標準 # the-aside-element |
瀏覽器相容性
BCD 表格僅在瀏覽器中載入