HTML Rp tag <rp> defines what to display if the HTML Ruby tag is not supported in browser. In other words we can say that, the HTML Rp Tag defines what will be rendered on the browser if the browser does not support HTML Ruby Tag.
HTML Rp tag is used with the HTML Ruby Tag and HTML Rt Tag.
The HTML Ruby tag defines the Chinese or Japanese Characters which needs to be helped in pronunciation and the HTML Rt Tag shows the required pronunciation.
HTML 5 Rp tag is a closed tag and needs HTML 5 Rp closing tag </rp>
Note: Rp Tag is new in HTML 5.
Syntax of HTML Rp Tag
<rp> Some Alternate text here.. </rp>
Example of HTML Rp Tag
HTML Rp Tag Code | Output |
<ruby> 中国 <rt> Zhōngguó <rp> Ruby Not</rp></rt> 食品<rt>shípǐn<rp> Supported</rp></rt> </ruby> |
中国 食品 |
In the HTML 5 Rp Tag example above, we have taken the example of “Chinese Food” which will be pronounced as “Zhōngguó shípǐn”. Note that the actual pronunciation is being displayed on top of the Chinese characters.
The text within the HTML Rp tag will be displayed on the browser if the browser does not supports HTML Ruby Tag.
Also note the usage of HTML Ruby Tag <ruby> for providing the Chinese characters.
HTML Rp Tag supports all HTML Global Attributes and HTML Event Attributes.
HTML Rp Tag Supporting Browsers
S. No. | Browser | Supported(Yes/No) |
1 | Internet Explorer | Yes (From IE 9 Onwards) |
2 | Firefox | Yes |
3 | Google Chrome | Yes |
4 | Opera | Yes |
5 | Safari | Yes |