HTML <ruby> tag
HTML <ruby> tag : Definition
• The HTML <ruby> tag is used to specify the ruby annotation that is a very small extra text, attached to the main text to indicate the translation, pronunciation or meaning of the corresponding characters.
• This type of annotation is basically used in East Asian typography such as Chinese or Japanese characters.
• The HTML <rt> tag is normally used for the purpose of translation, explanation or pronunciation of characters(for East Asian typography such as Chinese or Japanese characters) in a <ruby> annotation.
• The <rt> tag must be enclosed by <ruby> and <rp>(optional) element.
• The HTML <rp> tag is used to provide fall back parenthesis for the browser which does not support <ruby> annotations.
• This <rp> tag is used within <ruby> tag and newly Added tag in HTML5.
Html <ruby> tag example 1:
<!DOCTYPE html> <html lang="en"> <head> <title>HTML ruby tag example</title> <style type="text/css"> </head> <body> <h1>Chinese Word</h1> <ruby> 欢迎 <rt>welcome</rt> </ruby> </body> </html>
Output :
Chinese Word
欢迎
Html <ruby> tag example 2:
<!DOCTYPE html> <html lang="en"> <head> <title>HTML ruby tag example</title> <style type="text/css"> </head> <body> <h1>Japanese Word</h1> <ruby> ようこそ <rt>welcome</rt> </ruby> </body> </html>
Output :
Japanese Word
ようこそ