<aside>:側邊欄元素
<aside>
HTML 元素代表文件中只間接相關於主要內容的部分。側邊欄常常被呈現為側邊欄或呼叫框。
嘗試一下
屬性
這個元素只包括全域屬性 (en-US)。
使用注意事項
- 請勿使用
<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>
結果
技術摘要
內容類型 | 流內容、章節型內容、捫及內容。 |
---|---|
允許內容 | 流內容。 |
標籤省略 | 不允許,開始和結束標籤都是必須的。 |
允許的父元素 | 任何接受流內容的元素。請注意,<aside> 元素不能是 <address> 元素的後代。 |
隱含的 ARIA 角色 | complementary (en-US) |
允許的 ARIA 角色 |
feed (en-US)、none (en-US)、
note (en-US)、presentation (en-US)、region (en-US)、search (en-US)
|
DOM 介面 | HTMLElement (en-US) |
規範
Specification |
---|
HTML Standard # the-aside-element |
瀏覽器相容性
BCD tables only load in the browser