HTML <rp> tag is utilized to offer alternative annotations for the content that is meant to be displayed in the browser in case the browser lacks support for displaying ruby annotations.
The ruby annotations are employed to showcase specific characters in multiple Asian languages, utilizing the <ruby> element.
The <rp> tag should wrap around the <rt> element using parentheses to contain the text of the annotation.
The <rp> tag is new in HTML5.
Syntax
Example
<rp>.....</rp>
Here are some details regarding the HTML <rp> element:
| Display | Inline |
|---|---|
| Start tag/End tag | Both Start and End tag |
| Usage | Textual |
Example
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML rp tag</title>
<style>
body{
text-align: center;
}
rt{ font-size: 18px;
color: green;
}
</style>
</head>
<body>
<h1>Example of rp tag</h1>
<ruby>
漢<rp>(</rp><rt>Kan</rt><rp>)</rp>
字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
</body>
</html>
Output:
Attribute:
Tag-specific attributes:
The <rp> tag does not possess any particular attribute.
Global attribute:
The <rp> tag facilitates the utilization of global attributes within HTML.
Event attribute:
The <rp> tag facilitates the event attributes within HTML.
Supporting Browsers
| Element | Chrome | IE | Firefox | Opera | Safari |
|---|---|---|---|---|---|
<rp> |
Yes | Yes | Yes | Yes | Yes |