References

Beginner-friendly references for web development, with live, editable examples.

The HTML <rp> tag

Element All modern browsers Updated
Quick answer

The HTML <rp> element provides fallback parentheses (or other characters) shown around a <rt> annotation only in browsers that cannot render <ruby> text properly.

Overview

The <rp> (ruby parenthesis) element is a graceful fallback within a <ruby> annotation. Browsers that support ruby hide it, while those that do not show its content — typically parentheses placed around the <rt> annotation.

The result is that the reading still makes sense inline even without ruby positioning: instead of the annotation floating above the base text, it appears in parentheses after it, like "漢字(かんじ)".

Syntax

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

Example

Live example
<p><ruby>語<rp>(</rp><rt>go</rt><rp>)</rp></ruby></p>

Best practices

  • Place <rp> elements around each <rt> as fallback.
  • Use opening and closing parentheses as the content, one before and one after the annotation.
  • Rely on it so the reading degrades gracefully in browsers without ruby support.
  • Use it only inside a <ruby>.

Frequently asked questions

What is the rp element?
A fallback element inside <ruby> that shows parentheses around the annotation when the browser cannot render ruby.
Why use rp?
So the reading still appears sensibly inline — in parentheses — in browsers that do not support ruby positioning.
What goes inside rp?
Usually a single parenthesis character, one before and one after the <rt> annotation.
Is rp shown in modern browsers?
No. Browsers that support ruby hide the <rp>; only those without support display it.