Ruby tag in HTML
- 24-07-2022
- Trung Minh
- 0 Comments
The ruby tag defines a comment for ruby characters.
So what are ruby characters? It is essentially the comments usually placed above or to the right of the kanji characters when writing Korean, Japanese, and Chinese languages. Those comments are often used to guide pronunciation, so they may not be familiar to readers. (Now you understand why Chinese, Korean, and Japanese are the most difficult languages to learn 🙂 .)
Use ruby tags in combination with rp and rt tags:
- The <ruby> tag contains one or more characters that need pronunciation annotations.
- The <rt> tag provides that annotation information.
- The <rp> tag defines what to display to browsers that don't support ruby annotations.
Using
Example : Use rt tag in combination with rp tag and ruby tag.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <h1>Học html miễn phí tại web888.vn</h1> <ruby>東 京<rt><rp>(</rp>と う き ょ う<rp>)</rp></rt> </ruby> </body> </html>