Adding visually engaging elements to content

Getting technical with code blocks

Stan Jobs
Stan Jobs

The <code> and <pre> elements are for displaying inline and multiline blocks of code.

Usage

Use the <code> element for inline code snippets.

The push() method adds one or more elements to the end of an array and returns the new length of the array.
<p>The <code>push()</code> method adds one or more elements to the end of an array and returns the new length of the array.</p>

Use the <pre> element for multiple lines of code.

  L          TE
    A       A
      C    V
       R A
       DOU
       LOU
      REUSE
      QUE TU
      PORTES
    ET QUI T'
    ORNE O CI
     VILISÉ
    OTE-  TU VEUX
     LA    BIEN
    SI      RESPI
            RER       - Apollinaire
<pre>
  L          TE
    A       A
      C    V
       R A
       DOU
       LOU
      REUSE
      QUE TU
      PORTES
    ET QUI T'
    ORNE O CI
     VILISÉ
    OTE-  TU VEUX
     LA    BIEN
    SI      RESPI
            RER       - Apollinaire
</pre>

Use <kbd> for input that is typically entered via keyboard.

To edit settings, press ctrl + s
<p>To edit settings, press <kbd>ctrl</kbd> + <kbd>s</kbd></p>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.