HTML rp tag

HTML <rp> tag

Use of <rp> tag

The <rp> tag is new in HTML5. It is used to display fall-back parenthesis of ruby annotations for the browsers that do not support ruby annotations. It should be used with <ruby> tag and <rt> tag.
Ruby annotations are used for describing languages in mostly Asian Languages.
Display: Inline

Example of <rp> tag

<ruby>
    印度 <rp>(</rp><rt>India</rt><rp>) </rp>
</ruby>

Supported Browsers

The following versions are the minimum versions that support the <rp> tag fully.

Tag Chrome browser Internet explorer browser Firefox browser Safari browser Opera browser
<rp> 5.0 5.5 38.0 5.0 15.0

Full Code Example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ruby>
印度 <rp>(</rp><rt>India</rt><rp>) </rp> , 美国 <rp>(</rp><rt>America</rt><rp>) </rp> are the powerful military countries.
</ruby>
</body>
</html>

Output

印度 (India) , 美国 (America) are the powerful military countries.

How to produce ruby annotations by using <ruby> tag, <rp> tag and <rt> tag?

1. To produce ruby annotations, all the elements should be contained within the <ruby> element.

<ruby>
</ruby>

2. Write the language (usually chinese or korean) you want to make as base in which the annotation has to be attached.

<ruby>
   印度
</ruby>

3. One <rp> element must enclose the left parenthesis while the other <rp> element must enclose the right parenthesis.

<ruby>
   印度 <rp>(</rp> <rp>)</rp>
</ruby>

4. Add the annotations using <rt> element within the parenthesis which is also between </rp> and <rp> tags.

<ruby>
   印度 <rp>(</rp> <rt>India</rt> <rp>)</rp>
</ruby>

Output is here

印度 ( India )

Output without <ruby> element

印度 ( India )

Some web experts use the following shortcuts to make ruby annotations.

<ruby>
   <rb>印度</rb> <rt>India</rt>
</ruby>

印度 India