Skip to: content, navigation

ruby (HTML element)

Spec
Depr. Empty Version
No No XHTML 1.1
Browser support (more…)
IE5.5+ FF2 SA3 OP9.5
Partial 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
5.5 6.0 7.0 1.0 1.5 2.0 1.3 2.0 3.0 9.2 9.5
Partial Partial Partial 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

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

Search