Try it
<ruby>
漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
Attributes
This element only includes the global attributes.
Usage notes
- Ruby annotations are for showing pronunciation of East Asian characters, like using Japanese furigana or Taiwanese bopomofo characters. The
<rp>element is used in the case of lack of element support; the<rp>content provides what should be displayed in order to indicate the presence of a ruby annotation, usually parentheses.
Examples
Using ruby annotations
This example uses ruby annotations to display the Romaji equivalents for each character.
<ruby>
漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
body {
font-size: 22px;
}
Result
See the article about the element for further examples.
Without ruby support
If your browser does not support ruby annotations, the result looks like this instead:
body {
font-size: 22px;
}
Technical summary
| Content categories | None. |
|---|---|
| Permitted content | Text |
| Tag omission | The end tag can be omitted if the element is immediately followed by an or another |
| Permitted parents | A element. |
| Implicit ARIA role | No corresponding role |
| Permitted ARIA roles | Any |
| DOM interface | HTMLElement |
Specifications
| Specification |
|---|
| HTML # the-rp-element |