概要
The HTML <ruby> 元素的意思是旁註標記。旁註標記用於標示東亞文字的發音。
| 內容類型 | 流內容、段落型內容、捫及內容 |
|---|---|
| 允許內容 | 段落型內容 |
| 標籤省略 | None, both the starting and ending tag are mandatory. |
| 允許父元素 | 參見規範 |
| DOM 介面 | HTMLElement |
屬性
這個元素只支援全域屬性。
範例
範例一:字
<ruby> 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby>
範例二:詞
<ruby> 明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp> </ruby>
規範
| 規範 | 狀態 | 註解 |
|---|---|---|
| WHATWG HTML Living Standard The definition of '<ruby>' in that specification. |
Living Standard | |
| HTML5 The definition of '<ruby>' in that specification. |
Recommendation |
瀏覽器相容性
| 功能 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本支援 | 5.0 | 38 (38) | 5.0 | No support | 5.0 |
| 功能 | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| 基本支援 | (Yes) | (Yes) | 38.0 (38) | (Yes) | (Yes) | (Yes) |