doc: update HTML Tag Attributes section

This commit is contained in:
Leon Xu committed 2021-07-29 12:10:23 -07:00
1 parent 0b73e37cca
commit 6f02fb307d
1 file changed
+30 -1
+30 -1
View File
@@ -125,4 +125,33 @@ HTML的全称是Hyper Text Markup Language(超文本标记语言)
内联元素只影响少量内容
- 例如:粗体文本、代码片段、图像
- 浏览器允许许多内联元素出现在同一行上
- 必须嵌套在块元素中
- 必须嵌套在块元素中
## HTML标签属性
有些标签可以包含称为属性的附加信息
语法:
```html
<element attribute="value" attribute="value">
content
</element>
```
例子:
```html
<a href="page2.html">Next page</a>
```
有些标签不包含内容,可以在一个标签中打开和关闭
语法:
```html
<element attribute="value" attribute="value">
content
</element>
```
例子:
```html
<br>, <hr>
```
例子:
```html
<img src="bunny.jpg" alt="pic from Easter">
```