diff options
Diffstat (limited to 'devdocs/html/element%2Fi.html')
| -rw-r--r-- | devdocs/html/element%2Fi.html | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/devdocs/html/element%2Fi.html b/devdocs/html/element%2Fi.html new file mode 100644 index 00000000..7fbed88f --- /dev/null +++ b/devdocs/html/element%2Fi.html @@ -0,0 +1,79 @@ +<header><h1><i>: The Idiomatic Text element</h1></header><div class="section-content"><p>The <code><i></code> <a href="../index">HTML</a> element represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others. Historically, these have been presented using italicized type, which is the original source of the <code><i></code> naming of this element.</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/i.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>Use the <code><i></code> element for text that is set off from the normal prose for readability reasons. This would be a range of text with different semantic meaning than the surrounding text. Among the use cases for the <code><i></code> element are spans of text representing a different quality or mode of text, such as: <ul> <li>Alternative voice or mood</li> <li>Taxonomic designations (such as the genus and species "<em>Homo sapiens</em>")</li> <li>Idiomatic terms from another language (such as "<em>et cetera</em>"); these should include the <a href="../global_attributes#lang"><code>lang</code></a> attribute to identify the language</li> <li>Technical terms</li> <li>Transliterations</li> <li>Thoughts (such as "She wondered, <em>What is this writer talking about, anyway?</em>")</li> <li>Ship or vessel names in Western writing systems (such as "They searched the docks for the <em>Empress of the Galaxy</em>, the ship to which they were assigned.")</li> </ul> </li> <li>In earlier versions of the HTML specification, the <code><i></code> element was merely a presentational element used to display text in italics, much like the <code><b></code> element was used to display text in bold letters. This is no longer true, as these tags now define semantics rather than typographic appearance. A browser will typically still display the contents of the <code><i></code> element in italic type, but is, by definition, no longer required to do so. To display text in italic type, authors should use the CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-style"><code>font-style</code></a> property.</li> <li>Be sure the text in question is not actually more appropriately marked up with another element. <ul> <li>Use <a href="em"><code><em></code></a> to indicate stress emphasis.</li> <li>Use <a href="strong"><code><strong></code></a> to indicate importance, seriousness, or urgency.</li> <li>Use <a href="mark"><code><mark></code></a> to indicate relevance.</li> <li>Use <a href="cite"><code><cite></code></a> to mark up the name of a work, such as a book, play, or song.</li> <li>Use <a href="dfn"><code><dfn></code></a> to mark up the defining instance of a term.</li> </ul> </li> </ul></div> +<h2 id="examples">Examples</h2> +<div class="section-content"> +<p>This example demonstrates using the <code><i></code> element to mark text that is in another language.</p> <div class="code-example"> +<p class="example-header"><span class="language-name">html</span></p> +<pre data-signature="PHmI/0yafArFd8LM2S9O2dl46U8y63Akk5NuGMk8T24=" data-language="html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>p</span><span class="token punctuation">></span></span> + The Latin phrase <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>i</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>la<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Veni, vidi, vici<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>i</span><span class="token punctuation">></span></span> is often mentioned in + music, art, and literature. +<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>p</span><span class="token punctuation">></span></span> +</pre> +</div> +</div> +<h3 id="result">Result</h3> +<div class="section-content"><div class="code-example" id="sect1"> + +<iframe class="sample-code-frame" title="Examples sample" id="frame_examples" src="https://live.mdnplay.dev/en-US/docs/Web/HTML/Element/i/runner.html?id=examples" 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> <a href="../content_categories#flow_content">Flow content</a>, <a href="../content_categories#phrasing_content">phrasing content</a>, palpable content. </td> </tr> <tr> <th scope="row">Permitted content</th> <td> +<a href="../content_categories#phrasing_content">Phrasing content</a>.</td> </tr> <tr> <th scope="row">Tag omission</th> <td>None, both the starting and ending tag are mandatory.</td> </tr> <tr> <th scope="row">Permitted parents</th> <td> Any element that accepts <a href="../content_categories#phrasing_content">phrasing content</a>. </td> </tr> <tr> <th scope="row">Implicit ARIA role</th> <td><code><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/generic_role">generic</a></code></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-i-element">HTML Standard <br><small># the-i-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>i</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">≤4</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">≤3.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="em"><code><em></code></a></li> <li>Other italicized elements: <a href="var"><code><var></code></a>, <a href="dfn"><code><dfn></code></a>, <a href="cite"><code><cite></code></a>, <a href="address"><code><address></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/i" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i</a> + </p> +</div> |
