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
Define computer code text
Define keyboard text
Define computer code example

HTML element definition keyboard input:

Example

    php.cn 

HTML kbd 元素表示键盘输入:

File | Open...

Program running result:

0.png

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


HTML element definition computer output:

Example

    php.cn 

HTML 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

Program running result:

1.png


##HTML Element definition programming:

elements do not retain extra spaces and line breaks:

Program running results:

code example

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


#HTML

 Element

Example

Program running result:

6.png


HTML element defines mathematical variables:

2.png

Continuing Learning
||
php.cn

爱因斯坦的公式:

E = m c2

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
# Define variables
          
Define preformatted text
    php.cn 

code 示例

var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" }
    php.cn 

code 元素不保留多余的空格和折行:

如需解决该问题,您必须在 pre 元素中包围代码:

 var person = { firstName:"Bill", lastName:"Gates", age:50, eyeColor:"blue" } 
##Example
    php.cn 

爱因斯坦的公式:

E = m c2

Program running result: