ruby rt rp Elements
Description
Ruby characters are notations placed above or to the right of characters in logographic languages such as Chinese or Japanese to help the reader to correctly pronounce the characters.
The ruby
element denotes a span of text
that contains a ruby.
You use the ruby
element in conjunction with
the rt
and rp
elements.
The rt
element marks the ruby notation,
and the rp
element denotes parentheses around an annotation that can
be displayed by browsers that don't support ruby annotations.
Example
The following code uses English text to demonstrate how ruby annotations are displayed by the browser.
<!DOCTYPE HTML>
<html>
<body>
<p>I like
<ruby>
CSS<!--from ww w. j av a2 s . com-->
<rp>(</rp>
<rt>Cascading Style Sheets</rt>
<rp>)</rp>
</ruby>
</p>
</body>
</html>
When the document is displayed in a browser that supports ruby annotations,
the rp
elements and their contents are ignored, and the
contents of the rt
element is displayed as an annotation.