<rt> Tag in HTML | Ruby Text

The <rt> tag in HTML is used to define the ruby text that provides additional information, such as pronunciation, to the main text in the <ruby> element. This is commonly used in East Asian languages to display phonetic annotations.

Key Points on <rt> Tag:

Syntax of <rt> Tag:

Syntax Example

<ruby>Main Text<rt>Ruby Text</rt></ruby>

Example of <rt> Tag in HTML:

This example demonstrates how to use the <rt> tag for ruby text.

Code Example

<!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>HTML <rt> Tag Example</title>
        </head>
        <body>
            <h1>HTML <rt> Tag Example</h1>
            <p>
                <ruby>漢字<rt>Kanji</rt></ruby>
            </p>
        </body>
        </html>

Output

HTML Tag Example

漢字Kanji

The <rt> tag is essential for providing ruby text (pronunciation or annotation) in the <ruby> element, improving readability and understanding, especially for complex characters in East Asian languages. It enhances the accessibility of text by offering additional context.