1.行内样式表
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
行内样式表适合于样式比较少的样式
<div style="color:pink;">今天很期待学习CSS</div>
<div>今天不期待学习CSS</div>
<div>今天不期待学习CSS</div>
<div>今天不期待学习CSS</div>
</body>
</html>
2.行内元素
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
span{
background-color: pink;
width:100px;
height:100px;
}
</style>
</head>
<body>
<span>123</span>
<span>456</span>
<span>789</span>
</body>
</html>
3.块级元素
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div{
background-color: pink;
/*width:100px;*/
height:100px;
}
</style>
</head>
<body>
<div>123</div>
<p>456</p>
<div>789</div>
<div>
<div>123</div>
<p>123</p>
</div>
</body>
</html>