W3docs

HTML <rt> Tag

The <rt> tag is used to add annotations at the top and bottom sides of the text, placed in the <ruby> tag.

The <rt> tag is used to add annotations (such as pronunciation guides) to the text, inserted within the <ruby> tag. The <ruby> tag defines a ruby annotation, which is typically used for relatively obscure characters in Japanese or East Asian languages.

The annotation placed in the <rt> tag contains the pronunciation tip or translation of the base text. By default, this annotation is displayed in a small print above the base text.

The <rt> tag is one of the HTML5 elements.

Syntax

The <rt> tag comes in pairs. However, the closing tag isn’t required if it is the last child of its parent. The closing tag of the <rt> element may be omitted when <rt> is immediately followed by another <rt>, <rb>, <rp>, or <rtc>, or when there isn’t any content remaining in the parent element.

Example of the HTML <rt> tag:

HTML <rt> Tag

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <ruby>
    漢 <rt>Kan</rt>
    字 <rt>ji</rt>
    </ruby>
  </body>
</html>

Result

rt tag example

Attributes

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

Practice

Practice

What is the purpose of the <rt> tag in HTML?