HTML Tag Reference - HTML tag <code>

<code> causes text to be displayed in a monospaced font and is usually applied to code samples.

Browser compatibility

<code> Yes Yes Yes Yes Yes

What's new in HTML5


Global Attributes

The <code> tag supports the Global Attributes in HTML.

Event Attributes

The <code> tag supports the Event Attributes in HTML.

Default CSS Settings

code {
    font-family: monospace;


A demo showing how to use <code> tag.

          This is a

Click to view the demo