html中標(biāo)簽分為兩大類:
1.塊級標(biāo)簽:一行只能有一個(不管標(biāo)簽的寬度是多少)
h1-h6, p, hr, 列表標(biāo)簽梯澜,table, form,
2.行內(nèi)標(biāo)簽:一行可以有多個
a, img, input,下拉列表(select), textarea
div標(biāo)簽,是空白標(biāo)簽渴析,沒有任何特殊的意義(無語義標(biāo)簽)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="">
<a href="">百度一下</a>
</div>
<div id="">
<a href="">淘寶</a>
</div>
<div style="background-color: red; width: 100px;">
我是div1 <br />
我是div111
</div>
<span style="background-color: royalblue;">
我是span4
</span>
<div style="background-color: yellow; width: 90px;">
我是div2
</div>
<div style="background-color: palevioletred; width: 120px;">
我是div3
</div>
<span style="background-color: green;">
我是span
</span>
<span style="background-color: gold;">
我是span2
</span>
<span style="background-color: greenyellow;">
我是span3
</span>
<span style="background-color: royalblue;">
我是span4
</span>
</body>
</html>