HTML <ruby> Tag

The <ruby>> tag defines furigana (also called yomigana or ruby), phonetic tips in Japanese and East Asian languages. The basic text annotation is placed in the <rp> tag. It is displayed in a small print above the hieroglyphs.

The <ruby> tag is a new element in HTML5.

The <rp> tag defines an alternative text, which is displayed in the browser not supporting the <ruby> tag.

Syntax

The <rp> tag comes in pairs; the closing tag is required.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <ruby>
    明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp>
    </ruby>
  </body>
</html>

Result

Attributes

The <ruby> tag supports the Global Attributes and the Event Attributes.

Browser support

5+ 5.5+ 38+ 5+ 15+