html
  1. html-rt-tag

HTML <rt> Tag

  • The HTML <rt> tag specifies the ruby text component of a ruby annotation.
  • Ruby text is used to provide a pronunciation guide of characters that might not be familiar to the reader, for example, Chinese or Japanese characters.
  • The <rt> tag must be used within a <ruby> tag.

Syntax

<ruby>
  漢 <rt> カン </rt>
  字 <rt> ジ</rt>
</ruby>

Example

<p> My name is <ruby>
  王 <rt> Wáng </rt>
  明 <rt> Ming </rt>
  </ruby>.</p>
Try Playground

Explanation

The <ruby> tag is used to indicate a ruby annotation. The <rt> tag must be used within the <ruby> tag to define the pronunciation of the ruby text.

Use

The <rt> tag is only used within a <ruby> tag and is used to specify the pronunciation of the ruby text that follows it.

Important Points

  • The <rt> tag must be a child element of the tag.
  • The <ruby> tag and <rt> tag are not widely supported by all browsers, so it is important to test the output in different browsers.
  • The <ruby> tag is not recommended for use in English documents.

Summary

The<rt> tag is used to specify the pronunciation of ruby text. The <rt> tag must be used within a <ruby> tag, which is used to provide a pronunciation guide for characters that might not be familiar to the reader, for example Chinese or Japanese characters. Though not widely supported across browsers, the tag is an important part of creating accessible web content for different languages and scripts.

Published on: