HTML Code

HTML <code> Tag

<code>A piece of computer code</code>

 Usage and Definition:

The <code> tag is a phrase tag. It defines a piece of Computer code.

Note: This tag is not deprecated, but it’s possible to achieve a richer effect with CSS.

All phrase tags:

Tag               Description & Details

<em>                 Renders as emphasized text

<strong>           Defines important text

<code>              Defines a piece of Computer codes

<samp>             Defines sample output from a computer program

<kbd>                Defines keyboard input

<var>                 Defines a variable

 

CSS Default  Settings

Most browsers will display the <code> element with the following default values:

 

code {
font-familymonospace;
}