HTML <rp> tag is used to provide fall back parenthesis for the content which is to be shown in the browser, if browser does not support display of ruby annotations.
The ruby annotations are used to display certain characters in several Asian languages, using <ruby> element.
The <rp> tag must enclose the <rt> element with parenthesis which contains the annotation’s text.
The <rp> tag is new in HTML5.
Syntax
<rp>.....</rp>
Following are some specifications about the HTML <rp> tag
Display | Inline |
Start tag/End tag | Both Start and End tag |
Usage | Textual |
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 contain any specific attribute.
Global attribute:
The <rp> tag supports the global attributes in HTML
Event attribute:
The <rp> tag supports the event attributes in HTML.
Supporting Browsers
Element | Chrome | IE | Firefox | Opera | Safari |
<rp> | Yes | Yes | Yes | Yes | Yes |
Leave a Reply