国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

HTML computer code

Computer encoding refers to the way a computer internally represents letters or numbers

Typically, HTML uses variable letter sizes, as well as variable letter spacing.

But this is not required when showing computer code examples.


Computer Code Elements

tag Description
<code> Define computer code text
<kbd> Define keyboard text
<samp> Define computer code example
# <var> Define variables <pre> Define preformatted text

HTML <kbd> element definition keyboard input:

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>php.cn</title>
</head>
<body style="font-size:16px">
<p>HTML kbd 元素表示鍵盤輸入:</p>
<p><kbd>File | Open...</kbd></p>
</body>
</html>

Program running result:

0.png

You can remove the <kbd> in the above code and see what the difference is


HTML <samp> element definition computer output:

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>php.cn</title>
</head>
<body style="font-size:16px">
<p>HTML samp 元素表示計(jì)算機(jī)輸出示例:</p>
<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>
</body>
</html>

Program running result:

1.png


##HTML <code> Element definition programming:

<code> elements do not retain extra spaces and line breaks:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>php.cn</title>
</head>
<body style="font-size:16px">
<p>code 示例</p>
<code>
    var person = {
    firstName:"Bill",
    lastName:"Gates",
    age:50,
    eyeColor:"blue"
    }
</code>
</body>
</html>

Program running results:

code example

var person = { firstName:"Bill", lastName:"Gates", Age:50, eyeColor:"blue" }


#HTML <pre> Element

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>php.cn</title>
</head>
<body style="font-size:16px">
<p>code 元素不保留多余的空格和折行:</p>
<p>如需解決該問題,您必須在 pre 元素中包圍代碼:</p>
<code>
<pre>
var person = {
    firstName:"Bill",
    lastName:"Gates",
    age:50,
    eyeColor:"blue"
}
</pre>
</code>
</body>
</html>

Program running result:

6.png


HTML <var> element defines mathematical variables:

##Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>php.cn</title>
</head>
<body style="font-size:16px">
<p>愛因斯坦的公式:</p>
<p><var>E</var> = <var>m</var> <var>c</var><sup>2</sup></p>
</body>
</html>

Program running result:

2.png

Continuing Learning
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>php.cn</title> </head> <body style="font-size:16px"> <p>愛因斯坦的公式:</p> <p><var>E</var> = <var>m</var> <var>c</var><sup>2</sup></p> </body> </html>
submitReset Code
<li id="rzpu4"><legend id="rzpu4"></legend></li>

    <span id="rzpu4"></span>