<ruby>: The HTML Ruby Annotation Element

I. Description

The HTML <ruby> element is used to create small annotations which appear above below or adjacent to other text. Typically the <ruby> element is used to show how to pronounce East Asian characters (such as Chinese, or Japanese characters). The <ruby> element may also be used to annotate other types of text but this is uncommon.

See Also

The <ruby> element is used in conjunction with the <rt> and <rp> elements.

II. Examples

<!DOCTYPE html>
<html>
    <head>
        <title>Ruby Example Page</title>
    </head>
    <body>
        <h1>Ruby Example Page</h1>
        <p>
            The japanese Kanji for <i>water</i> is
            <ruby><rp>(</rp><rt>Mizu</rt><rp>)</rp>
            </ruby>;
            the word <i>water</i> may be written in Hiragana as
            <ruby><rp>(</rp><rt>mi</rt><rp>)</rp><rp>(</rp><rt>zu</rt><rp>)</rp>
            </ruby>.
        </p>
    </body>
</html>

This document was last updated: