Basic HTML syntax and text tags!

HTML basic structure:

The extension of HTML files is .html or .htm
The structure of HTML text includes a "head" part (head), and a "body" part (body), where the "head" part provides information about the web page, and the "body" The HTML that provides the specific content of the web page
is composed of: tags and content, each HTML page has two parts (head and body), and its outermost layer is...
The syntax of tags wrapping HTML tags (tags) is Surrounded by < and >.
There are two types of HTML tags: double tags: <tag name>…</tag name> and single tags: <tag name/>
HTML tags can also add attributes: <tag name attribute name 1="value 1" attribute name 2 = "value 2" attribute name n = "value n">...</
tag name>
HTML tag specification: tag name is lowercase, attributes use double quotation marks, and tags must be closed. The browser will not report an error if the specification does not comply with the specification, and will try to parse it as much as possible, and the effect will not be displayed .

<!DOCTYPE html>
<html lang="en">
 <head>
 <meta charset="UTF-8">
 <title>⽹⻚标题</title>
 <!-- 此处可以写各种⻚头属性设置、CSS样式和JavaScript脚本等... -->
 </head>
 <body>
 ⽹⻚显示内容
 </body>
</html>

HTML comments

Comments can be inserted into the html document code. Comments are descriptions and explanations of the code.

HEAD header setting in HTML

The head tag acts on the head of the web page, and its content will not be displayed in the body. It mainly completes various settings for the current page. The
head often contains the following sub-tags:
insert image description here

<!DOCTYPE html>
<html lang="en">
 <head>
 <meta charset="UTF-8">
 <title>⽹⻚标题</title>
 <meta name="Keywords" content="关键字" />
 <meta name="Description" content="简介、描述" />
 <link type="text/css" rel="stylesheet" href="**.css"/>
 <style type="text/css">
 嵌⼊css样式代码
 </style>
 <script >
 JavaScript脚本程序
 </script>
 </head>
 <body>
 <h3>⽹⻚显示内容</h3>
 </body>
</html>

HTML text tags

Commonly used text labels are as follows:
<hn>...</hn>where n is a value from 1–6. Title tag (bold, stand alone line)
<i>...</i>italic accented
<em>...</em>italic
<b>...</b>bold accented
<strong>...</strong>bold
<cite></cite>Title (quote)
<sub>...</sub>subscript <sup>...</sup>of the work superscript
<del>...</del>strikethrough

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>⽂本标题示例</title>
</head>
<body>
 <h3>HTML标签实例--⽂本标签</h3>
 <h1>h1标题</h1>
 <h2>h2标题</h2>
 <h3>h3标题</h3>
 <h4>h4标题</h4>
 <h5>h5标题</h5>
 <h6>h6标题</h6>
 <i>i: 斜体标签</i> <br/>
 <em>em: 强调斜体标签</em> <br/>
 <b>b: 加粗标签</b><br/><br/>
 <strong>strong: 强调加粗标签</strong><br/>
 <del>del: 删除线</del><br/>
 <u>u: 下划线</u> <br/><br/>
 ⽔分⼦:H<sub>2</sub>O <br/>
 4<sup>2</sup>=16
</body>
</html>

The operation effect is as follows:
insert image description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324137228&siteId=291194637