Skip to: content, navigation

by Ian Lloyd

ruby (HTML element)

Spec
Depr. Empty Version
No No XHTML 1.1
Browser support full matrix
IE5.5+ FF2 Saf3 Op9.5
Partial None None None

Example

Here’s an example of ruby in action:

<p>
 <ruby>
  <rb>家辺 勝文</rb>
  <rt>liaison</rt>
 </ruby>
</p>
Type
inline element
Contains
rb, rt, rp, rbc, rtc
Contained by
block-level elements, inline elements

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.

Use This For …

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

Compatibility

IE5.5Partial
6.0Partial
7.0Partial
Firefox1.0None
1.5None
2.0None
Safari1.3None
2.0None
3.0None
Opera9.2None
9.5None

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.

Related Reading

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

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters