​PageObject: Computer code

​This PageObject renders programming code without executing it. The programming code is embedded into HTML5 <pre> and <code> tags.

HTML5 defines the following language options, from which the editor can select one:

  • HTML
  • JavaScript
  • CSS

HTML example (system generated)

<div class="fx_po_code"><pre><code class="language-LANGUAGE">CODE</code></pre></div>

​CSS example (boilerplate)

div.fx_po_code pre {
    background: #000;
    color: #fff;
    padding: .6em 1em;
    overflow-x: scroll;
​This PageObject renders as block element.