HTML <ruby> 标签
定义和用法
The <ruby>
tag specifies a ruby annotation. (ruby 标签定义了一个 ruby 标注。)
A ruby annotation is a small extra text, attached to the main text to indicate the pronunciation or meaning of the corresponding characters. This kind of annotation is often used in Japanese publications. (Ruby 标注是附加在主文本上的一个小文本,用于指示相应字符的发音或含义。这类标注常用于日文出版物。)
Use <ruby>
together with <rt> and <rp>: The <ruby>
element consists of one or more characters that needs an explanation/pronunciation, and an <rt> element that gives that information, and an optional <rp> element that defines what to show for browsers that do not support ruby annotations. (将 <ruby>
与 <rt> 和 <rp> 一起使用:<ruby>
元素包含一个或多个需要解释/发音的字符,以及一个提供该信息的 <rt> 元素,还有一个可选的 <rp> 元素,它定义了不支持 Ruby 标注的浏览器应显示的内容。)
浏览器支持
表格中的数字表示完全支持该元素的首个浏览器版本。
元素 | |||||
---|---|---|---|---|---|
<ruby> | 5.0 | 5.5 | 38.0 | 5.0 | 15.0 |
全局属性
The <ruby>
tag also supports the Global Attributes in HTML. (ruby 标签也支持 HTML 中的全局属性。)
事件属性
The <ruby>
tag also supports the Event Attributes in HTML. (ruby 标签也支持 HTML 中的事件属性。)