The <rp> tag in HTML is used to provide parentheses around a ruby main text that defines the information. This tag is used when the browser does not support ruby annotations. Such kind of annotation is used in Japanese publications. It is an optional tag. This tag is used within the <ruby> tag. This tag is new in HTML5.
Syntax
<rt><rp>[</rp> Explanation... <rp>]</rp></rt>Example:Â In this example, we are using the <rp> tag inside a <ruby> element to display fallback brackets [ ] around the pronunciation annotation "GeeksforGeeks" for browsers that don't support ruby annotations.
<!--Driver Code Starts-->
<!DOCTYPE html>
<html>
<body>
<h1>GeeksforGeeks</h1>
<h2><rp> Tag</h2>
<!--Driver Code Ends-->
<ruby>GFG:
<rt>
<!-- HTML rp tag starts here -->
<rp>[</rp>GeeksforGeeks
<rp>]</rp>
<!-- HTML rp tag starts here -->
</rt>
</ruby>
<!--Driver Code Starts-->
</body>
</html>
<!--Driver Code Ends-->
- The
<rp>tag provides fallback parentheses or other characters for browsers that do not support the<ruby>annotation element. - In this example,
<rp>[</rp>and<rp>]</rp>display square brackets around the ruby text "GeeksforGeeks" when ruby annotations are not supported.