<code> tag

HTML <code> tag

The <code> tag defines text in computer code for formatting. This is one of the Phrase tags.

To understand formatting in details, Click on HTML Formatting.

Syntax:
<code> Text….</code> 

Example

<p>Hello <code>this represents computer code.</code>Thank You</p>

Default CSS Value

font-family: monospace;

How Browser will display

INLINE.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
None None None

Attributes used with <code> tag

NONE

Global Attributes

The <code> tag supports Global Attributes.

Event Attributes

The <code> tag supports Event Attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<strong>, <b>, <em>, <i>, <small>, <sub>, <sup>, <ins>, <del>, <mark>, <samp>, <kbd>, <var>, <cite>, <blockquote>, <q>, <bdi>, <bdo>, <address>, <abbr>, <acronym>.

Tutorials for all brains!