HTML5 code tag, Definition of <code>tag in html5


 

HTML5 code tag, Definition of <code>tag in html5

Here, we will introduce you about the use and implementation of the <code>tag in html document

Here, we will introduce you about the use and implementation of the <code>tag in html document

HTML5 code tag, Definition of <code> tag in html5

Here, we will introduce you about the use and implementation of the <code> tag in html document. This tag is used for representing the programming code in to the html document in the font of computer code text. The text within the <code> tag is marked up with the surrounding.

The <code> tag represents the programming code and program outputs in the computer code font style in the html document. This tag have both start and end tag.

Declaration Syntax:

<code>Your Code Here</code>

Example: Codetag.html.

<!DOCTYPE html>
<html>
  <head>
     <title>Example of code tag</title>
  </head>
 <body>
  <b>This is the code tag Example:</b><br>
   <code> 
       <blockquote>
           String str=new String("Gyan");<br>
           System.out.println(str);
      </blockquote>
    </code>
 </body>
</html>

Output:

Download This Example:

 

Difference between HTML5 and HTML4.01

There is no difference with the html4 version and don't have any element specific attribute.

Ads