HTML computer code elements

      No Comments on HTML computer code elements

HTML computer code elements refer to a fragment of computer code.

For example:

<code>
var x=66;
</code>
var y=66;

Various HTML computer code elements are:

<kbd> element for keyboard input

HTML <kbd> defines a keyboard input.

For example:

<kbd> file open
file close</kbd>
file open
file close

HTML <samp> element

<samp> defines a sample output of a computer program.
For example:

<samp>
demo.example.com login: Apr 12 09:10:17
Linux 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189
</samp>

demo.example.com login: Apr 12 09:10:17
Linux 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189

<code> element

The <code> element defines a piece of computer programming code.
For example:

<code>
var x=5;
var y=6;
var z=x+y;
</code>
var x=5;
var y=6;
var z=x+y;

HTML <var> element

The HTML element defines a variable.

The variable could be a variable in a mathematical expression or a variable in programming context:

For Example:

Einstein wrote: <var>E</var> = <var>m</var><var>c</var><sup>2</sup>.
Einstein wrote: E = mc2.

Leave a Reply

Your email address will not be published. Required fields are marked *