2.5.5 base.text.code Code
The <code>
element represents a fragment of computer code. The <var>
element represents a variable. The <samp>
element represents (sample)
output from a program or computing system. The <kbd>
element represents
user input (typically keyboard input.)
Example
The code
element represents a fragment of computer code.
There are n flavors of ice cream to be available for purchase!
The computer said Too much cheese in tray two but I didn't know what that meant.
To make George eat an apple, select File | Eat Apple…
Markup: base/text/text-code.twig
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">p</span>></span>The <span class="hljs-tag"><<span class="hljs-name">code</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>code<span class="hljs-tag"></<span class="hljs-name">code</span>></span> element represents a fragment of computer code.<span class="hljs-tag"></<span class="hljs-name">p</span>></span>
<span class="hljs-tag"><<span class="hljs-name">p</span>></span>There are <span class="hljs-tag"><<span class="hljs-name">var</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>n<span class="hljs-tag"></<span class="hljs-name">var</span>></span> flavors of ice cream to be available for purchase!<span class="hljs-tag"></<span class="hljs-name">p</span>></span>
<span class="hljs-tag"><<span class="hljs-name">p</span>></span>The computer said <span class="hljs-tag"><<span class="hljs-name">samp</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>Too much cheese in tray two<span class="hljs-tag"></<span class="hljs-name">samp</span>></span> but I didn't know
what that meant.<span class="hljs-tag"></<span class="hljs-name">p</span>></span>
<span class="hljs-tag"><<span class="hljs-name">p</span>></span>To make George eat an apple, select <span class="hljs-tag"><<span class="hljs-name">kbd</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>File | Eat Apple…<span class="hljs-tag"></<span class="hljs-name">kbd</span>></span><span class="hljs-tag"></<span class="hljs-name">p</span>></span>
</span>
Source:
base/text/_text.scss
, line 76