
- HTML Home
- HTML Roadmap
- HTML Introduction
- HTML History & Evolution
- HTML Editors
- HTML Basic Tags
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Fonts
- HTML Blocks
- HTML Style Sheet
- HTML Formatting
- HTML Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Frames
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Code Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Table Headers & Captions
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB & RGBA Colors
- HTML - HEX Colors
- HTML - HSL & HSLA Colors
- HTML - HSL Color Picker
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - Document Object Model (DOM)
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Character Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <rp> Tag
Introduction to <rp> Tag
The HTML <rp> tag provides fallback parenthesis around ruby text for browsers that do not support ruby annotations using the <ruby> tag. Introduced in HTML5, the <rp> tag must enclose the <rt> tag with parentheses, which contain the annotation's text.
Syntax
Following is the syntax of <rp> tag −
<rp>.....</rp>
Attributes
The HTML <rp> tag supports Global and Event attributes.
Example: Global Attributes
In the following example, we are create a ruby text enclosure using the <rp> tag. We are creating an HTML document that uses the <rp> tag to enclose ruby text. This HTML code uses the <ruby> tag to display ruby text with annotations, styled to have a larger font size.
<!DOCTYPE html> <html> <head> <style> ruby { font-size: 2em; } </style> </head> <body> <ruby> <rp>(</rp> <rt>kan</rt> <rp>)</rp> <rp>(</rp> <rt>ji</rt> <rp>)</rp> </ruby> </body> </html>
Example: Styling <rp> Tag
Considering the following example, where are create an HTML document using the <rp> tag and style it with CSS properties. This HTML code centers text, and demonstrates the <rp> tag with annotations. Running the code will display the text styled with CSS on the web page.
<!DOCTYPE html> <html> <head> <style> body { text-align: center; } ruby { font-size: 3em; color: green; } </style> </head> <body> <h3>HTML rp Tag</h3> <ruby> <rp>(</rp> <rt>kan</rt> <rp>)</rp> <rp>(</rp> <rt>ji</rt> <rp>)</rp> </ruby> </body> </html>
Example: Applying <rp> Tag on Unsupported Ruby Annotations
Let's look at the following example, where we use the <rp> element to display parenthesis foe user agents that don't support Ruby annotations. Running the code will display the ruby annotations on the webpage. This HTML code centers text, styles ruby text to be large and demonstrates the <rp> tag with annotations..
<!DOCTYPE html> <html> <head> <style> body { text-align: center; } ruby { font-size: 2em; color: #808000; } </style> </head> <body> <h3>Example of rp tag </h3> <ruby> <rp>(</rp> <rt></rt> <rp>)</rp> <rp>(</rp> <rt></rt> <rp>)</rp> </ruby> </body> </html>
Supported Browsers
Tag | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
rp | Yes 5.0 | Yes 5.5 | Yes 38.0 | Yes 5.0 | Yes 15.0 |