ruby (HTML element)

Spec
Depr. Empty Version
No No XHTML 1.1
Browser support (more…)
IE5.5+ FF3.5 SA4 OP10 CH2
Partial None None None None

Syntax

<ruby>
</ruby>

Description

The ruby element provides a mechanism for annotating characters of East Asian languages (Japanese, Chinese, Korean, and so on). Typically, these annotations appear in a smaller typeface above or beside the regular text, as Figure 1 shows.

Figure 1. Ruby text as shown in Internet Explorer (supported) and Firefox (not supported) Ruby text as shown in Internet Explorer (supported) and Firefox (not supported)

The ruby element contains rb and rt elements, which relate to ruby base text, and the annotation for that base text, respectively. The ruby element may also contain the rp element (ruby parentheses) which is used to provide some visual help for non ruby-supporting browsers.

Example

Here’s an example of ruby in action:

<p>
 <ruby>
  <rb>家辺 勝文</rb>
  <rt>liaison</rt>
 </ruby>
</p>

Use This For …

This element is used to provide help with users’ pronunciation of obscure characters, or as a language learning aid.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Partial Partial Partial Partial None None None None None None None None None None None None None

Only Internet Explorer offers any support for text marked up using ruby at this time. Other browsers ignore the markup and display the ruby text in the order in which it appears in the source.

User-contributed notes

Related Products