2.5.2 base.text.i Italics
The <em>
element or the <i>
element is used for emphasizing a snippet of
text with italics.
Feel free to use <i>
element in HTML5. <i>
is meant to convey voice,
technical terms, etc.
Example
The following snippets of text are rendered as italic text.
Italic text nested inside bold text should still be
italic.
Markup: base/text/text-i.twig
<span class="xml">The following snippets of text are <span class="hljs-tag"><<span class="hljs-name">em</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>></span>rendered<span class="hljs-tag"></<span class="hljs-name">em</span>></span> as <span class="hljs-tag"><<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>></span>italic text<span class="hljs-tag"></<span class="hljs-name">i</span>></span>.
Italic text nested inside <span class="hljs-tag"><<span class="hljs-name">b</span>></span>bold text <span class="hljs-tag"><<span class="hljs-name">i</span>></span>should<span class="hljs-tag"></<span class="hljs-name">i</span>></span><span class="hljs-tag"></<span class="hljs-name">b</span>></span> <span class="hljs-tag"><<span class="hljs-name">strong</span>></span>still be
<span class="hljs-tag"><<span class="hljs-name">em</span>></span>italic<span class="hljs-tag"></<span class="hljs-name">em</span>></span><span class="hljs-tag"></<span class="hljs-name">strong</span>></span>.
</span>
Source:
base/text/_text.scss
, line 124