HTML - <rt> Tag



The HTML <rt> tag stands for the ruby text tag; it specifies the ruby text explanation of a ruby annotation. which is used to provide pronunciation, translation, or transliteration information for the writing systems of Chinese, Japanese, and Korean languages.

The <rt> tag must be enclosed within <ruby> and <rp> tag.

Syntax

Following is the syntax of <rt> tag −

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

Example

In the following example, we are creating an HTML document 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>Example of rt tag</h1>
   <ruby> チュートリアルポイント <rt>tutorialspoint</rt>
   </ruby>
</body>
</html>

When we run the above code, it will generate an output conisting of the text displayed both in english and japanese on the webpage.

Example

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

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

On running the above code, the output window will pop up displaying the text both in english and chinese on the webpage.

Example

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>Example of rt tag</h1>
   <ruby> 이것은 한국어입니다. <rt>This is korean language </rt>
      <p></p> 튜토리얼포인트입니다 <rt>This is tutorialspoint </rt>
   </ruby>
</body>
</html>

When we run the above code, it will generate an output consisting of the text displayed in both english and korean languages on the webpage.

html_tags_reference.htm
Advertisements