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.
It is used for user input from keyboard or through command.
|
HTML
Ayesha
Tech writer at newsandstory
Total 752 views