3 ms·
The `<rp>` tag showed in the examples, isn't explained on the page but is a fallback - something that should be rendered if the ruby tag is not understood. Sad
by wodenokoto 5y ago
The `<rp>` tag showed in the examples, isn't explained on the page but is a fallback - something that should be rendered if the ruby tag is not understood.
Sadly, the rp page doesn't show any examples of what fallback behavior might look like.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp
- shawnz 5y agoSimply remove all the tags to see how the fallback behaviour would look, for example data:text/html;charset=utf-8,%E6%BC%A2%20(kan)%20%E5%AD%97%20(ji)
- kelnos 5y agoIn general, browsers will just drop tags they don't understand, while still rendering the tags' contents (as normal in-line text). So if, like in the example, you did: <ruby> 明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp> </ruby> But the browser didn't have support <ruby>, it would just render as: 明日 (Ashita) The idea is that a <ruby>-supporting browser wouldn't need to render the parentheses, because it's going to display "Ashita" in a special way that sets it off from the regular text (so you "annotate" the parens with <rp>). But in a browser that doesn't support <ruby>, you'd want it to still display in a sane, understandable way, where it would still be easy to understand that the added text is a pronunciation hint.