HTML code: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 13: Line 13:
<syntaxhighlight lang='html'>
<syntaxhighlight lang='html'>
<html>
<html>
  <head>
    <style>
    code {
      font-family: Consolas,"courier new";
      color: crimson;
      background-color: #f1f1f1;
      padding: 2px;
      font-size: 105%;
    }
    </style>
  </head>
</html>
</html>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 06:48, 30 April 2021

External

Internal

Overview

The <code> tag defines text as computer code in the document.

Rendering

The content inside is displayed in the browser's default monospace font. CSS can be used to modify the rendering of the <code> elements.

In-Line <style>

<html>
  <head>
    <style>
    code {
      font-family: Consolas,"courier new";
      color: crimson;
      background-color: #f1f1f1;
      padding: 2px;
      font-size: 105%;
    }
    </style>
  </head>
</html>