HTML computer code

Computer code refers to the way the computer internally represents letters or numbers.

In general, HTML uses variable letter sizes, as well as variable letter spacing.

This is not required when the computer code example is displayed.

Computer code element

label      description
<code>Defining computer code text
<kbd> Define keyboard text
<samp>Define computer code examples
<var>Defining variables
<pre>Defining preformatted text

The HTML <kbd> element defines keyboard input:


You can remove the <kbd> from the above code to see what is different.

The HTML <samp> element defines the computer output:


HTML <code> element definition programming:

The <code> element does not retain extra spaces and lines:

Program running result:

Code example
   Var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" } 

HTML <pre> element

The HTML <var> element defines a mathematical variable:


Last Updated: 2018-07-06 12:32:44 By akshay


share_facebook share_twitter share_google_plus

Please Comment Here :