HTML Ruby Text (
<rt>
) element
specifies the ruby text component of a ruby annotation, which is used to provide pronunciation, translation, or transliteration information for East Asian typography. The
<rt>
element must always be contained within a
<ruby>
元素。
See the article about the
<ruby>
element for more examples.
| 内容类别 | None. |
|---|---|
| 准许内容 | 措词内容 . |
| Tag omission |
The end tag may be omitted if the
<rt>
element is immediately followed by an
<rt>
or
<rp>
element, or if there is no more content in the parent element
|
| Permitted parents |
A
<ruby>
元素。
|
| Implicit ARIA role | 无对应角色 |
| Permitted ARIA roles | 任何 |
| DOM 接口 |
HTMLElement
|
此元素只包括 全局属性 .
This simple example provides Romaji transliteration for the kanji characters within the
<ruby>
元素:
<ruby> 漢 <rt>Kan</rt> 字 <rt>ji</rt> </ruby>
body {
font-size: 22px;
}
The output looks like this in your browser:
On a browser without ruby support, this example might look like this:
漢 Kan 字 ji
body {
font-size: 22px;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of '<rt>' in that specification. |
实时标准 | |
|
HTML5
The definition of '<rt>' in that specification. |
推荐 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
rt
|
Chrome 完整支持 5 | Edge 完整支持 79 | Firefox 完整支持 38 | IE 完整支持 5 | Opera 完整支持 15 | Safari 完整支持 5 | WebView Android 完整支持 Yes | Chrome Android 完整支持 Yes | Firefox Android 完整支持 38 | Opera Android 完整支持 14 | Safari iOS 完整支持 Yes | Samsung Internet Android 完整支持 Yes |
完整支持