Home Tutorial Html Html5 HTML5 code tag, Definition of <code>tag in html5

 
 

HTML5 code tag, Definition of <code>tag in html5
Posted on: September 6, 2010 at 12:00 AM
Advertisement
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.

Advertisement

Related Tags for HTML5 code tag, Definition of <code>tag in html5:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 6, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com