Home > Backend Development > PHP Problem > HTML computer code elements

HTML computer code elements

(*-*)浩
Release: 2023-02-23 19:32:02
Original
2991 people have browsed it

HTML computer code elements

Computer code

var person = {
    firstName:"Bill",
    lastName:"Gates",
    age:50,
    eyeColor:"blue"
}
Copy after login

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>
Copy after login

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>
Copy after login

HTML code format

HTML Element definition programming code example:

Example

<code>
var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" }
</code>
Copy after login

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>
Copy after login

The above is the detailed content of HTML computer code elements. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template