Skip to content

109 Sandbox

A website made for testing

HTML elements: code and preformatted text

Published ·UPD ·In Testing

First, two paragraphs. Lorem ipsum lorem nisi mattis sagittis platea fusce massa quis quam urna at, gravida volutpat semper magna interdum quam per pretium nullam hendrerit.

Massa adipiscing hendrerit mattis aenean interdum scelerisque id magna quisque lacus dapibus, diam facilisis senectus hendrerit phasellus litora cras venenatis vitae eu ad, enim vestibulum a placerat tempus ante sodales laoreet felis dolor habitasse ullamcorper bibendum nisi pharetra orci elementum, nec lectus aenean consequat aptent, congue risus aliquam dapibus gravida.

Code wrapped in <code>:

body { color: red; }

Code wrapped in <pre>:

body {
  color: red;
}

Code wrapped in <pre> and <code>:

const power = (base, exponent) => {
  let result = 1;
  
  for (let count = 0; count < exponent; count++) {
    result *= base;
  }
  
  return result;
};

Code wrapped in a Markdown fenced code block:

const power = (base, exponent) => {
  let result = 1;

  for (let count = 0; count < exponent; count++) {
    result *= base;
  }

  return result;
};

Another piece of code wrapped in a Markdown fenced code block:

def foo(x):
    if x == 0:
        bar()
        baz()
    else:
        qux(x)
        foo(x - 1)