<rt>:Ruby 文本元素

<rt> HTML 元素指定 ruby 注释的 ruby 文本组件,用于提供东亚版式的发音、翻译或音译信息。<rt> 元素必须始终包含在 <ruby> 元素内。

¥The <rt> HTML 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> element.

Try it

有关更多示例,请参阅有关 <ruby> 元素的文章。

¥See the article about the <ruby> element for more examples.

属性

¥Attributes

该元素仅包含 全局属性

¥This element only includes the global attributes.

示例

¥Examples

使用 ruby 注释

¥Using ruby annotations

这个简单的示例为 <ruby> 元素中的汉字字符提供罗马字音译:

¥This simple example provides Romaji transliteration for the kanji characters within the <ruby> element:

html
<ruby><rt>Kan</rt><rt>ji</rt> </ruby>
css
body {
  font-size: 22px;
}

结果

¥Result

技术总结

¥Technical summary

内容类别 没有任何。
允许的内容 措辞内容.
标签遗漏 如果 <rt> 元素后面紧跟着 <rt><rp> 元素,或者父元素中没有更多内容,则可以省略结束标记
允许的父级 <ruby> 元素。
隐式 ARIA 角色 没有对应的角色
允许的 ARIA 角色 任何
DOM 接口 HTMLElement

规范

Specification
HTML Standard
# the-rt-element

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看