Loading...
HTML <code> Tag

HTML <code> Tag

In this tutorial, we will learn about code tag in HTML with the help of examples.


<code> Tag

Code tag <code> is used to defines a piece of computer code or computer coded text.
The text inside the <code> tag is rendered in monospace font as default.

Syntax

<code>.....</code>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>code Tag</title>
  </head>
  <body>
    <p>The CSS <code>border</code> properties is used to define a border around the content.</p>
  </body>
</html>

Output

The CSS border properties is used to define a border around the content.


Global Attribute

Code Tag support all the global attributes of HTML.


Event Attribute

Code Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of code tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML col Tag.

- Related Topics