HTML Code

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

List of HTML Phrase Tags

Tag Description
<em> Displays emphasized text
<strong> Displays important text
<dfn> Defines a definition term
<code> Defines a piece of computer code
<samp> Specifies a sample output from a computer program
<kbd> Defines keyboard input
<var> Defines a variable

See this example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of HTML Code Tag</title>
</head>
<body>
	<em>It is inside em tag.</em><br> 
	<strong>It is inside strong tag.</strong><br>  
	<dfn>It is inside dfn tag.</dfn><br>  
	<code>It is inside code tag.</code><br>  
	<samp>It is inside samp tag.</samp><br>  
	<kbd>It is inside kbd tag.</kbd><br>  
	<var>It is inside var tag.</var>
 </body>
</html>