<ruby>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTML <ruby> 元素 被用来展示东亚文字注音或字符注释。

内容范畴 流式内容, 短语内容, palpable content.
允许内容 短语内容
标签省略 不允许,开始标签和结束标签都不能省略。
允许的父级元素 See prose
DOM 接口 HTMLElement

属性

本元素支持 全局属性

示例

示例 1: 字

html
<ruby><rp>(</rp><rt>han</rt><rp>)</rp><rp>(</rp><rt>zi</rt><rp>)</rp>
</ruby>

示例 2: 词

html
<ruby> 明 日 <rp>(</rp><rt>ming ri</rt><rp>)</rp> </ruby>

规范

Specification
HTML
# the-ruby-element

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ruby

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参阅