HTML <ruby> Tag
Description
The <ruby>
HTML element is intended to add a small annotation above or below the specified text. This form of recording is mainly used for ideographic writing like the Chinese language, but can be used for other languages if you want to write one text over another.
The <ruby>
element itself acts as a container for <rt>
, it forms an annotation to the text after which it comes; as well as <rp>
, this element is for browsers that do not support <ruby>
.
The name comes from the word "ruby", which in the printing house denotes a small font.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
<ruby>
漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt>
</ruby>
Attributes
None
Global Attributes
The <ruby>
tag also supports the Global Attributes in HTML5
Event Attributes
The <ruby>
tag also supports the Event Attributes in HTML5
Browser Support
The following table will show you the current browser support for the HTML <ruby>
tag.
Desktop | |||||
12 | 5 | 38 | 15 | 5 |
Tablets / Mobile | |||||
18 | 38 | 14 | 4.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th September 2023