Enter your email id to get regular update free
Login
Your Email
Pasword

What are the Computer Code Elements in HTML?

HTML code element is used for a fragment of computer code.

The HTML element define the fragment of computer code.
Text surrounded by <code> tag is displayed in browser's default monospace font.
<code>
x=3;
y=2;
z=x+y;
</code>
The code doesn't preserve any extra white space to fix this issue you can put it in <pre>.
<pre>
<code>
x=3;
y=2;
z=x+y;
</code>
</pre>
<var> in HTML
It defines a variable in HTML.Variable van be a mathematical expression or programming content.
Einstein equation:<var>E</var>=<var>mc</var><sup>2</sup>
<samp> in HTML
It is used to represent the output in html.It is displayed in browser's monospace.
<p>If output is wrong the the it will return<samp>Error!</samp></p>
<kbd> in HTML
It is used for user input from keyboard or through command.
<p>Select whole document by pressing <kbd>Ctrl+A</kbd></p>
Computer Code Elements
HTML
Ayesha
Tech writer at newsandstory
Total 375 views