WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <code> Tag


Example

Format text in a document:

<code>A piece of computer code</code>
Try it yourself »

Definition and Usage

<code> A tag is a phrase tag that defines computer code text.

Tip: We are not opposed to using this tag, but if you use this tag just to achieve a certain visual effect, we recommend that you use CSS, which may get richer effects.

All phrase tags:

tag description
<em> Rendered as emphasized text.
<strong> Defines important text.
<dfn> Define a definition item.
<code> Defines computer code text.
<samp> Defines sample text.
<kbd> Defines keyboard text. It indicates that the text was typed from the keyboard. It is often used in computer-related documents or manuals.
<var> Define variables. You can compare this tag with <pre> and <code> Labels work together.

Browser Support

Element
<code> Yes Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

NONE.