html tutorial - Code <code> tag in HTML - html5 - html code - html form



  • <code> tag is used defined a piece of computer code.
  • <code> tag is one of the Phrase tag.
  • <code> tag is displayed in the browsers with default monospace font.
  • <code> tag supports the Event and Global attributes.
  • <code> tag belongs to Flow content, Palpable content and Phrasing content Category.

Syntax for <code> tag in HTML:

<code>text here…..</code>

Sample Coding for <code> tag in HTML:

Tryit<!DOCTYPE html>
<html >
    <body>
        <code>Hi, Welcome to Wikitechy site……</code>    
    </body>
</html>

Code Explanation for <code> tag in HTML:

code explanation for code tag

  1. The Sentence “Hi, Welcome to Wikitechy Site…..” defined inside the <code> element will be displayed in monospace font.

Output of <code> tag in HTML:

output for code tag

  1. Here the output shows the sentence ”Hi, Welcome to Wikitechy site….” in monospace font.

Browser Support for <code> tag:

Yes Yes Yes Yes Yes

Related Searches to code tag in html