HTML5 has {ruby, rt, rp} tags. These are used for pronunciation markup for Asian languages (mostly Japanese, sometimes Chinese). This page show examples of how to use it.
Following is HTML code for ruby annotation of the chinese characters 漢字, with the japanese pronunciation {かん,じ}.
<ruby>漢<rt>かん</rt>字<rt>じ </rt></ruby>
Here's what your browser shows: 漢字
If your browser supports ruby annotation, the pronunciation should be rendered in small font above the chinese characters.
The following are 2 more examples. The first one uses the pinyin pronunciation system, the second uses zhuyin. 〔☛ Linguistics: Zhuyin (ㄅㄆㄇㄈ), Pinyin, IPA, Comparison〕
<ruby>汉<rt>hàn</rt>字<rt>zì </rt></ruby> <ruby>漢<rt>ㄏㄢˋ</rt>字<rt>ㄗˋ </rt></ruby>
what your browser shows: 汉字, 漢字
The “rp” Tag
The “rp” tag is used to add parenthesis around the pronunciation symbols for browsers that does not support ruby.
Example:
<ruby> 漢 <rp>(</rp><rt>かん</rt><rp>)</rp> 字 <rp>(</rp><rt>じ</rt><rp>)</rp> </ruby>
what your browser shows: 漢 字
As of today (), the browsers that support ruby are: {Google Chrome, Safari, IE9}. Firefox and Opera are fails.
Back to HTML5 Tags.
blog comments powered by Disqus