This reference is built into PageRIJ — a live HTML, CSS & SVG authoring and learning environment.

HTML <rp> element

The <rp> element represents fallback parentheses for ruby annotation. It is used inside <ruby>, before and after an <rt> annotation.

Modern browsers that support ruby normally do not show the <rp> contents. They display the ruby text properly as a small annotation above, below, or beside the base text.

Without ruby layout, the same text can read as 漢字(かんじ). The parentheses separate the annotation from the base word. The second line of the example below illustrates this in plain text; it does not disable ruby support in the browser.

Use two separate <rp> elements: one containing an opening parenthesis before <rt>, and one containing a closing parenthesis after it. All three are siblings inside <ruby>; neither <rp> contains the annotation.

Use <rp> only for ruby fallback punctuation. Ordinary parentheses elsewhere in a sentence need no special element.

Attributes: GLOBALS.

Typical layout:
<p>Ruby rendering:
  <ruby lang="ja">漢字<rp>(</rp><rt>かんじ</rt><rp>)</rp></ruby>
</p>
<p>Plain-text fallback illustration:
  <span lang="ja">漢字(かんじ)</span>
</p>
Visual representation:

Ruby rendering: 漢字(かんじ)

Plain-text fallback illustration: 漢字(かんじ)