HTML <rp> tagS2C Home   « HTML <rp> tag

Definition

The <rp> tag is used to provide parentheses or other content around a ruby text component of a ruby annotation and is shown as a fallback when browsers don't support ruby annotations.

The <rtc> tag must be nested within the <ruby> tag and be positioned either immediately before or after an <rt> or <rtc> element.

The <rp> tag was introduced in HTML5.

Example


<ruby>
  伦 <rp>(</rp><rt>lún</rt><rp>)</rp><rp>(</rp><rt>dūn</rt><rp>)</rp>
  <rtc> London</rtc>
</ruby>

(lún)(dūn) London

Attributes

The following attributes can be used with the <rp> tag.


<rp> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <rp> tag.
<rp> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<rp class="name">Fallback Text</rp>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<rp id="name">Fallback Text</rp>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<rp style="color:red;">Fallback Text</rp>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<rp title="Content info">Fallback Text</rp>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<rp accesskey="a">Fallback Text</rp>
tabindexSpecifies a tab order for the element.

<rp tabindex="1">Fallback Text</rp>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<rp dir="ltr">Fallback Text</rp>
<!-- The text will flow from right to left -->
<rp dir="rtl">Fallback Text</rp>
langSpecifies a language code for the content of the element.

<rp lang="en">Fallback Text</rp>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<rp spellcheck="true">Fallback Text</rp> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<rp translate="no">Fallback Text</rp> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<rp contenteditable="true">Fallback Text</rp> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<rp draggable="true">Fallback Text</rp>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<rp hidden>Fallback Text</rp> 
<rp hidden="hidden">Fallback Text</rp> 
<rp> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<rp oncopy="go()">Fallback Text</rp> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<rp oncut="go()">Fallback Text</rp>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<rp onpaste="go()">Fallback Text</rp>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<rp ondrag="go()">Fallback Text</rp>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<rp ondragend="go()">Fallback Text</rp>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<rp ondragenter="go()">Fallback Text</rp>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<rp ondragleave="go()">Fallback Text</rp>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<rp ondragover="go()">Fallback Text</rp>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<rp ondragstart="go()">Fallback Text</rp>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<rp ondrop="go()">Fallback Text</rp>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<rp onblur="go()">Fallback Text</rp>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<rp onchange="go()">Fallback Text</rp>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<rp oncontextmenu="go()">Fallback Text</rp>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<rp onfocus="go()">Fallback Text</rp>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<rp oninput="go()">Fallback Text</rp>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<rp oninvalid="go()">Fallback Text</rp>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<rp onreset="go()">Fallback Text</rp>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<rp onselect="go()">Fallback Text</rp>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<rp onsubmit="go()">Fallback Text</rp>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<rp onkeydown="go()">Fallback Text</rp>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<rp onkeypress="go()">Fallback Text</rp>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<rp onkeyup="go()">Fallback Text</rp>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<rp onabort="go()">Fallback Text</rp>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<rp oncanplay="go()">Fallback Text</rp>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<rp oncanplaythrough="go()">Fallback Text</rp>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<rp oncuechange="go()">Fallback Text</rp>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<rp ondurationchange="go()">Fallback Text</rp>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<rp onemptied="go()">Fallback Text</rp>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<rp onended="go()">Fallback Text</rp>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<rp onloadeddata="go()">Fallback Text</rp>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<rp onloadedmetadata="go()">Fallback Text</rp>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<rp onloadstart="go()">Fallback Text</rp>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<rp onpause="go()">Fallback Text</rp>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<rp onplay="go()">Fallback Text</rp>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<rp onplaying="go()">Fallback Text</rp>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<rp onprogress="go()">Fallback Text</rp>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<rp onratechange="go()">Fallback Text</rp>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<rp onseeked="go()">Fallback Text</rp>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<rp onseeking="go()">Fallback Text</rp>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<rp onstalled="go()">Fallback Text</rp>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<rp onsuspend="go()">Fallback Text</rp>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<rp ontimeupdate="go()">Fallback Text</rp>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<rp onvolumechange="go()">Fallback Text</rp>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<rp onwaiting="go()">Fallback Text</rp>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<rp onclick="go()">Fallback Text</rp>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<rp ondblclick="go()">Fallback Text</rp>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<rp onmousedown="go()">Fallback Text</rp>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<rp onmousemove="go()">Fallback Text</rp>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<rp onmouseout="go()">Fallback Text</rp>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<rp onmouseover="go()">Fallback Text</rp>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<rp onmouseup="go()">Fallback Text</rp>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<rp onwheel="go()">Fallback Text</rp>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<rp onscroll="go()">Fallback Text</rp> 
Window - NONE

Relevant HTML Tutorials

HTML Basics - Language Tags