<rb>
The
<rb>
element designates the base text for ruby annotations in East Asian languages. It must be within
<ruby>
tags and is often paired with
<rt>
for pronunciation guides and
<rp>
for fallback rendering.
Note:
The
<rb>
tag is deprecated, meaning it’s no longer recommended for use in new projects. Instead, characters can be written directly within the
<ruby>
tags.
Syntax
<ruby><rb>Base text goes here</rb><rp>(</rp> <rt>Annotation text goes here</rt> <rp>)</rp></ruby>Example
The example below showcases how the
<rb>
tag is used to transliterate the Chinese characters meaning'I like to write code'
inside a<ruby>
element.<ruby><rb>我</rb><rt>I</rt> <rb>喜欢</rb><rt>like</rt> <rb>写</rb><rt>to write</rt><rb>程序</rb><rt>code</rt></ruby>This is what it looks like in the browser: