HTML / HTML Tags

HTML <Rp> Tag

Dec 12, 2022
2 min read
HTML rp Tag

Definition

The <rp> tag is used to provide parenthesis or other content around a ruby text component where <ruby> elements are not supported by the web browser.

Example

<p>
  <ruby style="font-size: 2em"
    >漢<rp>(</rp><rt>かん</rt><rp>)</rp>字<rp>(</rp><rt>じ</rt
    ><rp>)</rp></ruby
  >
</p>
<p>
  <ruby>
    ♥<rp>:</rp><rt>Heart</rt><rp>,</rp><rt lang="fr">Cœur</rt
    ><rp>.</rp> ☘<rp>:</rp><rt>Shamrock</rt><rp>,</rp
    ><rt lang="fr">Trèfle</rt><rp>.</rp> ✶<rp>:</rp><rt>Star</rt><rp>,</rp
    ><rt lang="fr">Étoile</rt><rp>.</rp>
  </ruby>
</p>

かん

: Heart, Cœur.: Shamrock, Trèfle.: Star, Étoile.

If there is no <ruby> support, the result would look like this:

漢(かん)字(

♥<: Heart, Cœur. ☘: Shamrock, Trèfle. ✶: Star, Étoile.

Usage

  • The <rp> opening tag is required.
  • The <rp> element only shows if the browser has <ruby> element support.
  • The <rp> closing tag can be omitted if the <rp> element is immediately followed by an <rt>](https://www.thewebmaster.com/html/tags/rt/)[] or <rp> element, or if there is no more content in the parent element.
  • An <rp> element must be a child of a <ruby> element. It must occur either immediately before or after an <rt> element.
  • You can find further examples of how to use <ruby> elements here.

Attributes

The <rp> element only supports the Global Attributes.

Specification

Browser Support

Desktop

ChromeEdgeFirefoxIEOperaSafari
YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes