Code

Display inline and multiline of code with Cœur-de-fer.

Inline code

To present a short code snippet within a line, use the <code> element.

For example, <section> should be wrapped as inline.
For example, <code><section></code> should be wrapped as inline.

Code blocks

Use <pre> element to diplay multiple line of code.

<p>Sample text here...</p>
<p>And another line of sample text here...</p>
<pre><code><p>Sample text here...</p>
<p>And another line of sample text here...</p>
</code></pre>

Variables

For indicating variables use the <var> tag.

y = mx + b
<var>y</var> = <var>m</var><var>x</var> + <var>b</var>

User input

Use the <kbd> to indicate input that is typically entered via keyboard.

To copy a part of text, press Cmd C and to paste it, press Cmd V.
  To copy a part of text, press <kbd>Cmd C</kbd> and to paste it, press <kbd>Cmd V</kbd>.

Sample output

For indicating sample output from a program use the <samp> tag.

This text is meant to be treated as sample output from a computer program.
<samp>This text is meant to be treated as sample output from a computer program.</samp>