<code> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:code

Introduction

code element marks for computer code.

code element summary

ItemValue
Elementcode
Local local attributes none
Changed in HTML5N/A

Style convention

code {
   font-family: monospace;
}

The following code shows how to use code element.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <code>
         var items = ["CSS", "HTML", "mangoes", "Oracle"];
         <br>
          document.writeln("I like " + items.length + " items");
      </code>  
   </body><!--from  w  w w. j  a va  2s  .c  o  m-->
</html>

Related Tutorials