<ruby>
Published Aug 18, 2023Updated Sep 5, 2023
Contribute to Docs
The <ruby>
tag is a semantic HTML element that represents small annotations usually used for showing the pronunciation of Japanese and East Asian characters. <ruby>
can be used together with <rt>
and/or <rp>
.
The <ruby>
tag entails one or more characters that require an explanation or pronunciation, the <rt>
element provides the explanation or pronunciation, and the optional <rp>
element provides what to show for browsers that lack support for annotations.
Syntax
<ruby><!-- Contents go here --></ruby>
<ruby>
wraps around the text that needs annotation.
Example
This following example shows <ruby>
being used with <rt>
and <rp>
tag:
<ruby> ゆきひろ まつもと <rp>(</rp><rt>Yukihiro Matsumoto</rt><rp>)</rp> </ruby>
This will display the following:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn HTML on Codecademy
- Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Free course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner Friendly7 hours