2.3 base.code Code

Toggle example guides Toggle HTML markup

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 y = mx + b flavors of ice cream to be available for purchase!

This text is meant to be treated as sample output from a computer program.

To switch directories, type cd followed by the name of the directory.
To edit settings, press ctrl + ,

Markup: 01-base/code/code.twig
<p>The <code>code</code> element represents a fragment of computer code.</p>
<p>There are <var><var>y</var> = <var>m</var><var>x</var> + <var>b</var></var> flavors of ice cream to be available for purchase!</p>
<p><samp>This text is meant to be treated as sample output from a computer program.</samp></p>
<p>To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
  To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd></p>
Source: 01-base/code/_code.scss, line 1