HTML <rt> Tag Definition, Usage and Examples

The <rt> HTML Tag indicates the ruby text component of a ruby annotation, which is used to provide information about East Asian typography’s pronunciation, translation, or transliteration. Always contain the <rt> HTML Tag within a <ruby> HTML Tag. The <rt> HTML Tag is part of the Formatting HTML category in HTML Element Reference. The attributes of the <rt> HTML Tag are global and event attributes. 

<rt> code block example to learn how it works is given below. 

<ruby>
base 
<rt>ruby text</rt>
</ruby>

The second example usage of the “<rt>” code block example is given below. 

<ruby>
爱 <rp>(</rp><rt>Ai</rt><rp>)</rp>
你<rp>(</rp><rt>Ni</rt><rp>)</rp>
</ruby>

What is <rt> HTML Tag?

The <rt> HTML Tag in a ruby annotation specifies an explanation or pronunciation of characters for East Asian typography. It is necessary for web developers because it is use in conjunction with <ruby> HTML Tag and <rp> HTML Tag. The <ruby> HTML Tag contains one or more characters that require explanation/pronunciation, a <rt> HTML Tag that provides that information, and an optional <rp> HTML Tag that specifies what to display in browsers that do not support ruby annotations.

How to Use <rt> HTML Tag?

To use <rt> HTML Tag, the web developer should insert the ruby text between the <ruby> and </ruby> tag and it will explain the ruby annotation, which is a brief text attached to the main text.

Example Usage of <rt> HTML Tag?

The following example of usage of <rt> HTML Tag is given below.

<ruby>
爱 <rp>(</rp><rt>Ai</rt><rp>)</rp>
君<rp>(</rp><rt>Kimi</rt><rp>)</rp>
</ruby>

What are the Attributes of <rt> HTML Tag?

There are multiple attributes for the <rt> HTML Tag. The following attributes are listed below.

What is the Default CSS Setting for <rt> HTML Tag?

  • Global Attributes: The <link> HTML Tag supports global attributes. All HTML elements, even those not specified in the standard, can have global attributes. This means that any non-standard elements must nevertheless allow certain characteristics, even if using such elements makes the content non-HTML5 compliant.
  • Event Attributes: The <link> HTML Tag supports event attributes. The Event Attributes always have a name that begins with “on” and is followed by the name of the event for which it is intended. They specify a script to run when an event of the defined type is dispatched to the element with the specified attributes.

The following is the Default CSS Setting for the <rt> HTML Tag.

rt {
  line-height: normal;
}

What are the Related other HTML Tags to <rt>?

The other related HTML Tags to <rt> HTML Tag are listed below.

  • <ruby> HTML Tag: The <ruby> HTML Tag is related to <rt> HTML Tag because they are both in formatting HTML Tags. Ruby annotations are defined using the <ruby> HTML Tag.
  • <rp> HTML Tag: The <rp> HTML Tag is related to <rt> HTML Tag because they are both in formatting HTML Tags. When ruby annotations are not supported, the <rp> HTML Tag is used to define the content to display.
  • <kbd> HTML Tag: The <kbd> HTML Tag is related to <rt> HTML Tag because they are both in formatting HTML Tags. The <kbd> HTML Tag is used to specify the keyboard input method.
  • <mark> HTML Tag: The <mark> HTML Tag is related to <rt> HTML Tag because they are both in formatting HTML Tags. The <mark> HTML Tag is used to indicate which text should be highlighted.
  • <meter> HTML Tag: The <meter> HTML Tag is related to <rt> HTML Tag because they are both in formatting HTML Tags. The <meter> HTML Tag denotes a scalar measurement.
Holistic SEO
Follow SEO

Leave a Comment

HTML <rt> Tag Definition, Usage and Examples

by Holistic SEO time to read: 3 min
0