HTML4 HTML5
The <rp> tag (short for Ruby Fallback Parenthesis) is used exclusively as a fallback for very old browsers that cannot display small phonetic annotations above text (so-called Ruby annotations, used mainly in Asian languages like Japanese or Chinese)[cite: 3].
It works like a "safety net"[cite: 3]:
<rp> content and displays small text perfectly above the main character[cite: 3].<rp> content (e.g., parentheses) so the hint doesn't merge with the main word[cite: 3].Both opening and closing tags are mandatory[cite: 3].
Attributes:
class, id, and style are used[cite: 3].Imagine we want to add pronunciation (phonetics) to the Japanese character 漢 (read as kan)[cite: 3]:
<ruby> – main container[cite: 3].漢 – main character[cite: 3].<rp>(</rp> – opening parenthesis (visible only in old browsers)[cite: 3].<rt>kan</rt> – small phonetic text[cite: 3].<rp>)</rp> – closing parenthesis (visible only in old browsers)[cite: 3].Code:
The browser will interpret this code as follows (in your browser, the word "kan" will appear in a small font above the character, and the parentheses inside <rp> will be hidden)[cite: 3]:
Word with pronunciation tip: 漢