Table of Contents
kbd标签元素
kbd标签元素经常被用于和计算机相关的文档和手册中
samp标签元素
计算机代码
var元素
Home Web Front-end HTML Tutorial What are the computer code elements of html

What are the computer code elements of html

Dec 19, 2018 am 11:52 AM
html

在HTML中,对用户输入,代码,程序等会使用不同的标签来显示,这些计算机代码元素分别为:元素、元素、元素、<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">元素、&lt;var&gt;元素;这些计算机代码元素支持固定的字母尺寸和间距。本篇文章就给大家介绍一下HTML的计算机代码元素,希望对你们有所帮助。&lt;/var&gt;</pre><div class="contentsignin">Copy after login</div></div>

What are the computer code elements of html

HTML 元素

元素是用于表示用户输入,键盘输入,语音命令等,它经常被用于和计算机相关的文档和手册中。被包含在 ..... kbd>标签内的文本通常是以浏览器的默认等宽字体显示。下面我们来看看示例:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
    <h2 id="kbd标签元素">kbd标签元素</h2>
    <p> <kbd>这就是在kbd元素中写入的内容的样子。</kbd></p><br>
    
    <h4 id="kbd标签元素经常被用于和计算机相关的文档和手册中">kbd标签元素经常被用于和计算机相关的文档和手册中</h4>
    <p>键入 <kbd>quit</kbd> 来退出程序,或者键入 <kbd>menu</kbd> 来返回主菜单。</p>
</body>
</html>
Copy after login

效果图:

What are the computer code elements of html

HTML 元素

元素是用于表示程序的输出(一段用户应该对其没有什么其他解释的文本字符)。被包含在元素中编写的文本通常是以浏览器的默认等宽字体显示。下面我们来看看示例:

<h2 id="samp标签元素">samp标签元素</h2>  
<p> <kbd>这就是在samp标签元素中写入的内容的样子。</kbd></p>
Copy after login

效果图:

What are the computer code elements of html

HTML 元素

元素是用于表示一些编程代码(计算机源代码或者其他机器可以阅读的文本内容),它是为软件代码的编写者设计的;被包含在元素中编写的文本将用等宽、类似电传打字机样式的字体(Courier)显示出来。下面我们来看看示例:

<h2 id="计算机代码">计算机代码</h2>  
<p>这是一个编程代码:</p>  
<code>  
x = 5;<br>  
y = 6;<br>  
z = x + y;  
</code>
Copy after login

效果图:

What are the computer code elements of html

HTML

 元素</span></strong></p><p><pre class="brush:php;toolbar:false"> 元素可定义预格式化的文本,可用来表示计算机的源代码。被包含在<pre class="brush:php;toolbar:false">元素中的文本会严格限制为等宽字体格式。下面我们来看看示例:</p><pre class='brush:php;toolbar:false;'><pre class="brush:php;toolbar:false">
<!DOCTYPE html>  
<html>
<head>
  <meta charset="utf-8">
</head>
<body>
  <p>pre标签元素</p>
</body>
</html>
Copy after login

在上面的代码中,

 标签中的特殊符号被转换为符号实体,比如 "<" 代表 "<",">" 代表 ">"。下面我们来看看效果:</p><p style="text-align: center;"><img src="/static/imghw/default1.png"  data-src="https://img.php.cn//upload/image/554/268/746/1545189772817296.jpg"  class="lazy" title="1545189772817296.jpg" alt="What are the computer code elements of html"/></p><p><span   style="max-width:90%">说明:</span>虽然<code>元素和<pre class="brush:php;toolbar:false"> 元素都是可以以等宽字体格式显示编程代码,但它们之间还是有差异的:</p><p><code>元素内的文本显示不保留多余的空格和折行;但在 pre 元素中的文本通常会保留空格和换行符。</p><p>我们来看看区别效果:</p><pre class='brush:php;toolbar:false;'><p>code标签</p>
<code>
var student = {
    学号:"01"
    姓名:"小华"
}
</code>
<p>pre标签</p>
<pre class="brush:php;toolbar:false">
var student = {
    学号:"02"
    姓名:"小明"
}
Copy after login

效果图:

What are the computer code elements of html

HTML 元素

元素用于定义变量。变量可以是数学表达式中的变量,也可以是编程上下文中的变量。下面我们来看看示例:

<h2 id="var元素">var元素</h2>  
<p>这是一个著名的公式: <var>E</var> = <var>mc</var><sup>2</sup>.</p>
Copy after login

效果图:

What are the computer code elements of html

总结:以上就是本篇文章的全部内容,希望能对大家的学习有所帮助。

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles