Home » HTML » HTML Code Tag

HTML Code Tag

HTML <code> tag is used to represent computer code. It defines a piece of computer code. By default, HTML Code Tag is displayed in the browser's default monospace font.

HTML Code Tag

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title> HTML Code Tag </title>
<em>Emphasized text</em><br>
<strong>Strong text</strong><br>
<code>A piece of computer code</code><br>
<samp>Sample output from a computer program</samp><br>
<kbd>Keyboard input</kbd><br>


HTML Code Tag Examples Emphasized text
Strong text
A piece of computer code
Sample output from a computer program
Keyboard input

HTML Code Tag

The HTML Code tag is a phrase tag that defines a piece of computer code.

Tags Description
<code> It defines a piece of computer code.
<kbd> It defines keyboard input.
<samp> It specifies a sample output from a computer program.
<pre> Defines preformatted text.
<dfn> It defines a definition term.
<var> It defines a variable.
<strong> It defines a important text.

Browser Support

Microsoft Edge browser.png Edge
Chrome browser.png Chrome
Firefox browser.png Firefox
Opera browser.png Opera
safari browser.png Safari

Color Picker

List of color names supported by all browser »

Character Code

List of character codes to display special character »

Language Code

List of all language supported by all browser »

Country Code

List of Country code supported by all browser »