Computer code
var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" }
HTML computer code format(Recommended learning: HTML introductory tutorial )
Normally, HTML uses variable letter sizes, as well as variable letter spacing.
This is not required when showing computer code examples.
, , and elements all support fixed letter sizes and spacing.
HTML keyboard format
HTML element definition keyboard input:
Example
<p>To open a file, select:</p> <p><kbd>File | Open...</kbd></p>
HTML Sample Format
HTML Element Definition Computer Output Example:
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>
HTML code format
HTML Element definition programming code example:
Example
<code> var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" } </code>
Element is not retained Extra spaces and line breaks
HTML variable formatting
HTML element defines mathematical variables:
Example
<p>Einstein wrote:</p> <p><var>E = m c<sup>2</sup></var></p>
The above is the detailed content of HTML computer code elements. For more information, please follow other related articles on the PHP Chinese website!