Skip to content

<rp> - The Ruby Fallback Parenthesis Element

Inline HTML5

The ruby fallback parenthesis element provides fallback parentheses for browsers that don’t support ruby annotations, ensuring readable text in all environments.

Result
<ruby>
base <rp>(</rp><rt>annotation</rt><rp>)</rp>
</ruby>

The <rp> element wraps parentheses that will only display in browsers without ruby support.

<ruby>
<rp>(</rp><rt>kan</rt><rp>)</rp>
</ruby>

Displays: 漢 with “kan” above

The <rp> element ensures graceful degradation:

  • In modern browsers: parentheses are hidden, ruby displays normally
  • In older browsers: parentheses display, making annotations readable
Result
Result
Result
Result

The standard pattern for ruby with fallback:

<ruby>
base text
<rp>(</rp>
<rt>annotation</rt>
<rp>)</rp>
</ruby>
Result
Result
Result

You can use different parenthesis styles:

Result

The <rp> element is typically hidden in supporting browsers:

Result
<!-- Graceful degradation -->
<ruby>
<rp>(</rp><rt>kan</rt><rp>)</rp>
<rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>

Works in all browsers with readable fallback.

BrowserRuby Support<rp> Behavior
Modern Chrome/Firefox/SafariYesHidden
IE 5.5-10PartialVisible
Very old browsersNoVisible
Result

Screen readers typically ignore <rp> elements in modern browsers, reading only the base text and ruby annotations.

The fallback parentheses ensure text remains readable even when ruby annotations aren’t visually displayed.

  1. Always use <rp> for maximum compatibility
  2. Use standard parentheses () unless you have a specific reason
  3. Place <rp> correctly - before and after each <rt> element
  4. Test in multiple browsers to ensure fallback works
BrowserVersionNotes
Chrome5+Hides <rp> automatically
Firefox38+Hides <rp> automatically
Safari5+Hides <rp> automatically
Edge79+Hides <rp> automatically
IE5.5+Shows <rp> in fallback mode

All modern browsers properly handle <rp> elements, hiding them when ruby is supported.