7.9.5 base.text.code Code

Toggle example guides Toggle HTML markup

The <code> element represents a fragment of computer code. 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
<p>The <code class="{{modifier_class}}">code</code> element represents a fragment of computer code.</p>

<p>There are <var class="{{modifier_class}}">n</var> flavors of ice cream to be available for purchase!</p>

<p>The computer said <samp class="{{modifier_class}}">Too much cheese in tray two</samp> but I didn't know
what that meant.</p>

<p>To make George eat an apple, select <kbd class="{{modifier_class}}">File | Eat Apple…</kbd></p>
Source: base/text/_text.scss, line 75