diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/html/element%2Frp.html | |
new repository
Diffstat (limited to 'devdocs/html/element%2Frp.html')
| -rw-r--r-- | devdocs/html/element%2Frp.html | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/devdocs/html/element%2Frp.html b/devdocs/html/element%2Frp.html new file mode 100644 index 00000000..18e91041 --- /dev/null +++ b/devdocs/html/element%2Frp.html @@ -0,0 +1,85 @@ +<header><h1><rp>: The Ruby Fallback Parenthesis element</h1></header><div class="section-content"><p>The <code><rp></code> <a href="../index">HTML</a> element is used to provide fall-back parentheses for browsers that do not support display of ruby annotations using the <a href="ruby"><code><ruby></code></a> element. One <code><rp></code> element should enclose each of the opening and closing parentheses that wrap the <a href="rt"><code><rt></code></a> element that contains the annotation's text.</p></div> +<h2 id="try_it">Try it</h2> +<div class="section-content"><iframe class="interactive is-tabbed-shorter-height" height="200" src="https://interactive-examples.mdn.mozilla.net/pages/tabbed/rp.html" title="MDN Web Docs Interactive Example" loading="lazy"></iframe></div> +<h2 id="attributes">Attributes</h2> +<div class="section-content"><p>This element only includes the <a href="../global_attributes">global attributes</a>.</p></div> +<h2 id="usage_notes">Usage notes</h2> +<div class="section-content"><ul> <li>Ruby annotations are for showing pronunciation of East Asian characters, like using Japanese furigana or Taiwanese bopomofo characters. The <code><rp></code> element is used in the case of lack of <a href="ruby"><code><ruby></code></a> element support; the <code><rp></code> content provides what should be displayed in order to indicate the presence of a ruby annotation, usually parentheses.</li> </ul></div> +<h2 id="examples">Examples</h2> + +<h3 id="using_ruby_annotations">Using ruby annotations</h3> +<div class="section-content"> +<p>This example uses ruby annotations to display the <a href="https://en.wikipedia.org/wiki/Romaji" target="_blank">Romaji</a> equivalents for each character.</p> <div class="code-example"> +<p class="example-header"><span class="language-name">html</span></p> +<pre data-signature="Y+5q/G3EBi/ofswS5LfyI/FrJgypPFnlRQxpSurHYlA=" data-language="html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>ruby</span><span class="token punctuation">></span></span> + 漢 <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rp</span><span class="token punctuation">></span></span>(<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rp</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rt</span><span class="token punctuation">></span></span>Kan<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rt</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rp</span><span class="token punctuation">></span></span>)<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rp</span><span class="token punctuation">></span></span> 字 <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rp</span><span class="token punctuation">></span></span>(<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rp</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rt</span><span class="token punctuation">></span></span>ji<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rt</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rp</span><span class="token punctuation">></span></span>)<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rp</span><span class="token punctuation">></span></span> +<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>ruby</span><span class="token punctuation">></span></span> +</pre> +</div> <h4 id="result">Result</h4> +<div class="code-example" id="sect1"> + +<iframe class="sample-code-frame" title="Using ruby annotations sample" id="frame_using_ruby_annotations" width="600" height="60" src="https://live.mdnplay.dev/en-US/docs/Web/HTML/Element/rp/runner.html?id=using_ruby_annotations" loading="lazy"></iframe> +</div> <p>See the article about the <a href="ruby"><code><ruby></code></a> element for further examples.</p> +</div> +<h3 id="without_ruby_support">Without ruby support</h3> +<div class="section-content"> +<p>If your browser does not support ruby annotations, the result looks like this instead:</p> +<div class="code-example" id="sect2"> + +<iframe class="sample-code-frame" title="Without ruby support sample" id="frame_without_ruby_support" width="600" height="60" src="https://live.mdnplay.dev/en-US/docs/Web/HTML/Element/rp/runner.html?id=without_ruby_support" loading="lazy"></iframe> +</div> +</div> +<h2 id="technical_summary">Technical summary</h2> +<div class="section-content"><figure class="table-container"><div class="_table"><table class="properties"> <tbody> <tr> <th scope="row"><a href="../content_categories">Content categories</a></th> <td>None.</td> </tr> <tr> <th scope="row">Permitted content</th> <td>Text</td> </tr> <tr> <th scope="row">Tag omission</th> <td> The end tag can be omitted if the element is immediately followed by an <a href="rt"><code><rt></code></a> or another <code><rp></code> element, or if there is no more content in the parent element. </td> </tr> <tr> <th scope="row">Permitted parents</th> <td> A <a href="ruby"><code><ruby></code></a> element. <code><rp></code> must be positioned immediately before or after an <a href="rt"><code><rt></code></a> element. </td> </tr> <tr> <th scope="row">Implicit ARIA role</th> <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role" target="_blank">No corresponding role</a></td> </tr> <tr> <th scope="row">Permitted ARIA roles</th> <td>Any</td> </tr> <tr> <th scope="row">DOM interface</th> <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"><code>HTMLElement</code></a></td> </tr> </tbody> </table></div></figure></div> +<h2 id="specifications">Specifications</h2> +<div class="_table"><table class="standard-table"> +<thead><tr><th scope="col">Specification</th></tr></thead> +<tbody><tr><td><a href="https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rp-element">HTML Standard <br><small># the-rp-element</small></a></td></tr></tbody> +</table></div> +<h2 id="browser_compatibility">Browser compatibility</h2> +<div class="_table"><table> +<thead> +<tr id="bct-browser-type"> +<th></th> +<th colspan="6">Desktop</th> +<th colspan="6">Mobile</th> +</tr> +<tr id="bct-browsers"> +<th></th> +<th>Chrome</th> +<th>Edge</th> +<th>Firefox</th> +<th>Internet Explorer</th> +<th>Opera</th> +<th>Safari</th> +<th>WebView Android</th> +<th>Chrome Android</th> +<th>Firefox for Android</th> +<th>Opera Android</th> +<th>Safari on IOS</th> +<th>Samsung Internet</th> +</tr> +</thead> +<tbody><tr> +<th><code>rp</code></th> +<td class="bc-supports-yes">5</td> +<td class="bc-supports-yes">79</td> +<td class="bc-supports-yes">38</td> +<td class="bc-supports-yes">5</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">5</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">38</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">4.2</td> +<td class="bc-supports-yes">1.0</td> +</tr></tbody> +</table></div> +<h2 id="see_also">See also</h2> +<div class="section-content"><ul> <li><a href="ruby"><code><ruby></code></a></li> <li><a href="rt"><code><rt></code></a></li> <li><a href="rb"><code><rb></code></a></li> <li><a href="rtc"><code><rtc></code></a></li> </ul></div><div class="_attribution"> + <p class="_attribution-p"> + © 2005–2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br> + <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp</a> + </p> +</div> |
