HTML - <rt> Tag



HTML <rt> tag used to specify the ruby text explanation of a ruby annotation. It's provide pronunciation, translation, or transliteration information for the writing systems of Chinese, Japanese, and Korean languages. This is a new tag included in HTML5. The <rt> tag must be enclosed within <ruby> and <rp> tag.

Syntax

<rt>.....</rt>

Attribute

HTML rt tag supports Global and Event attributes of HTML.

Examples of HTML rt Tag

In the following examples we will see the use cases, where and how to use the HTML rt tag to specify the ruby text explanation of a ruby annotation.

Specifying rt Element

In the following example, we are creating a example to demonstrate the working of the <rt> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML rt tag</title>
   <style>
      rt {
         font-size: 25px;
         color: green;
      }
   </style>
</head>
<body>
   <h1>HTML rt Tag</h1>
   <ruby> 
      チュートリアルポイント <rt>tutorialspoint</rt>
   </ruby>
</body>
</html>

Implementing Chinese Words

Considering the following example, we are using the <rt> tag to explain the Chinese words.

<!DOCTYPE html>
<html>
<head>
   <title>HTML rt Tag</title>
   <style>
      rt {
         font-size: 25px;
         color: green;
      }
   </style>
</head>
<body>
   <h1>HTML rt Tag</h1>
   <ruby> 
      教程点 <rt> tutorialspoint </rt> 
      简单易学 <rt> Easy to learn </rt>
   </ruby>
</body>
</html>

Implementing Korean Language

Let's look at the following example, where we are going to explain the Korean language with the help of <rt> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML rt Tag</title>
   <style>
      rt {
         font-size: 25px;
         color: green;
      }
   </style>
</head>
<body>
   <h1>HTML rt Tag</h1>
   <ruby> 
      이것은 한국어입니다. <rt>This is korean language </rt>
      튜토리얼포인트입니다 <rt>This is tutorialspoint </rt>
   </ruby>
</body>
</html>

Supported Browsers

Tag Chrome Edge Firefox Safari Opera
rt Yes 5.0 Yes 5.5 Yes 38.0 Yes 5.0 Yes 15.0
html_tags_reference.htm
Advertisements