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 中的事件屬性。)