Ruby Annotation for East Asian Text
The <ruby> element attaches small pronunciation hints above or beside base text — common in Japanese furigana (ruby), Chinese pinyin, and Korean hangul annotations. <rt> is the annotation; <rp> provides parentheses for browsers that don't support ruby.
Japanese Furigana
私は 東京 に住んでいます。
I live in 東京 (Tokyo).
The first kanji reading is automatically shown above. On old browsers,
the <rp> fallback would render: 東京(とうきょう).
Chinese Pinyin
北京 is the capital of China.
人工智能 (AI) is transforming every industry.
Element Anatomy
<ruby>
漢字 ← base text
<rt>かんじ</rt> ← annotation
<rp>(</rp> ← open paren fallback
かんじ ← fallback text
<rp>)</rp> ← close paren fallback
</ruby>
Browser Support
All modern browsers support ruby natively. The <rp> elements only appear as visible parentheses in browsers from ~2010 or earlier — they're hidden by CSS in modern engines.
Ruby isn't limited to CJK scripts — it can annotate Latin abbreviations, IPA pronunciations, or foreign loanwords. Just remember: the <rt> content should always be shorter or equal in length to the base text.