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>

Click to view the demo

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.





















Home »
  HTML CSS »
    HTML »




HTML Introduction
HTML Document
HTML Section
HTML Group Content
HTML Text Marker
HTML Table
HTML Form
HTML Embed