HTML5 <ruby> tag

Table of Contents

  1. Introduction
  2. Sample Code
  3. More Resources


The <ruby> tag and its two children <rt> and <rp> are completely new in HTML5. In fact, this is the only major feature to have come from XHTML 1.1 into HTML5. Ruby stands for "Ruby annotations", which are small, annotative glosses used in East Asian typography. They are used as pronunciation help for relatively obscure characters.

The <rt> tag stands for "ruby text" and is used as pronunciation aid to the character(s) defined in the enclosing <ruby> tag. The <rp> is used to mark up ruby parenthesis, which is basically a precaution measure for browsers that do not support the <ruby> tag.

Ruby tag does not have any specific attributes, it does however support global and event attributes.

Sample Code

漢 <rp>(</rp><rt> ㄏㄢˋ </rt><rp>)</rp>

漢 ( ㄏㄢˋ )

More resources

This is a section to refer to other great articles, tutorials, reference documents, etc ... Some good places to look for more information might include:

  1. W3schools reference
  2. Controversy about the usability of the tag
For more complete information about compiler optimizations, see our Optimization Notice.