rt

Specifies the ruby text (annotation) in a ruby annotation, providing pronunciation or other guidance above base text.

Description

The <rt> element specifies the ruby text — the small annotation that appears above (or beside) base text. It must be contained within a <ruby> element.

VB styles <rt> at 0.5em font size with centered alignment, and applies CJK script fonts when inside a CJK language context. The i18n system can control <rt> visibility via data-ruby on <html>.

When to Use

  • Inside <ruby> to provide pronunciation guides
  • Japanese furigana (hiragana readings for kanji)
  • Chinese pinyin (romanized pronunciation)
  • Pronunciation guides for words in any language

Examples

CSS Reference

Visibility Control

The i18n system provides data-ruby on <html> to control when <rt> annotations display: show (always), hide (visually hidden but accessible), or auto (CJK languages only). See the ruby element page for details.

Accessibility

  • Screen readers may read base text followed by ruby text, or offer options to hear annotations
  • Ruby text is valuable for language learners and those with reading difficulties
  • When data-ruby="hide" is used, <rt> is visually hidden but remains in the DOM for screen readers

Related

  • <ruby> — Parent element for ruby annotations (required)
  • <rp> — Fallback parentheses for non-supporting browsers
  • Internationalization guide — Ruby visibility control, script-specific typography