<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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ruby |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.