<rb>

The HTML <rb> element defines the base text for a ruby annotation, working with <rt> and <rp> to offer pronunciation or supplementary information for East Asian scripts.

rb tag

The <rb> element in HTML is used within a <ruby> element to define the base text being annotated. It typically consists of one or more characters receiving ruby annotations.

Syntax

index.html
<ruby>
  <rb>Base Text</rb>
  <rt>Annotation</rt>
</ruby>

rb Demo

Example with ruby text: 漢字Kanji.

index.html
<p>
  Example with ruby text: <ruby><rb>漢字</rb><rt>Kanji</rt></ruby>.
</p>

Definition and Usage

The <ruby> tag is used for ruby annotations, which provide additional text to indicate pronunciation or meaning, commonly seen in Japanese texts. The <rt> tag is used for annotations, while the optional <rp> tag ensures compatibility with browsers that do not support ruby annotations. The <ruby> element contains the annotated characters, and <rt> provides the relevant details.

Attributes

This element includes global attributes.

See also

Conclusion

The <rb> tag in HTML is used within the <ruby> element to specify the base text being annotated, often seen in languages such as Japanese. It works alongside the <rt> tag, which provides the annotation (such as pronunciation or meaning). This structure helps present text with additional context, enhancing readability and comprehension. The <ruby> system is particularly useful for displaying annotated characters in complex scripts.