html
在前端的世界里最常见的标签莫过于HTML,你在每一个前端网页里都可以看到它的存在。它包裹住整个网页,我们对网页的全部的操作都在这里进行。
语法:
Statements...
代码:
<html>
<head>
<title>Title of your web page</title>
</head>
<body>HTML web page contents </body>
</html>
head
head标签是用来包裹头部元素的,比如:title标签,style标签,metal标签…
语法:
Statements...
代码:
<head>Contains elements describing the document</head>
body
body标签是用来定义HTML文档的body元素。它包含,比如image,tables,lists这类的标签。我们添加的HTML元素都是放在body里面的。
语法:
Statements...
代码:
<body>The content of your HTML page</body>
title
定义网页的标题。
语法:
Statements...
代码:
<tittle>tab name</tittle>
h1,h2,h3,h4,h5
顾名思义(head 1…5)头部标签是用来定义HTML文档头部的。
语法:
Statements...
Statements...
Statements...
Statements...
Statements...
Statements...
### 代码: ```Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
``` # p p(Paragraph tag)用来定义段落的标签。 ### 语法: >Statements...
### 代码: ```GeeksforGeeks: Computer science portal
# em
em(emphasis tag)渲染强调文本。
### 语法:
><em> Statements... </em>
### 代码:
GeeksforGeeks
# b
b(bold tag)文本加粗
### 语法:
><b> Statements... </b>
### 代码:
Bold word
# u
u(Underline tag)渲染出来的文本有下划线
### 语法:
><u> Statements... </u>
### 代码:
GeeksforGeeks
# strike
strike(Deleted text tag)渲染出的文本,文字中间显示一条横杠。
### 语法:
><strike> Statements... </strike>
### 代码:
GeeksforGeeks
# a
a(Anchor tag)这个标签可以用来跳转向另外一个页面,也可以在页面内部进行跳转。
### 语法:
><a href="..."> Statements... </a>
### 代码:
GeeksforGeeks ``` # li li(List tag)这个标签用来列举文本 ### 语法: >
- Statements...
- ### 代码: ```
- List item 1
- List item 2
- ``` # ol ol (order list) 按照特别的顺序枚举文本。 ### 语法: >
- Statements...
- List item 1
- List item 2
- List item 3
- List item 4
# ul ul(unordered list)枚举文本时不按顺序进行枚举 ### 语法: ><ul> Statements... </ul> ### 代码:
- List item 1
- List item 2
- List item 3
- List item 4
# <br> Empty (Non-Container) Tags:换行标签 ### 语法: ><br> ### 代码:
GeeksforGeeks
A computer science portal# <img> img(Image tag)在HTML文档中添加图片 ### 语法: ><img> ### 代码:
# link link(Link tag) 用来引入外部的css样式(后面的教程我会提到) ### 语法: ><link> ### 代码:
# <(防止转译)hr/> <(防止转译)hr/>(Horizontal rule tag)在HTML文档中,显示一条线。 ### 语法: ><(防止转译)hr/> ### 代码:
```