1、内嵌样式
2、嵌入样式
h1 {color: antiquewhite;}
3、外部样式(大部分使用)
<link rel="stylesheet" href="css.css">
4、权重比较(内嵌样式>嵌入样式=外部样式)
style="color: red;"
h1 {color: antiquewhite;}
<link rel="stylesheet" href="css.css">
5、源代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>引入css方法</title>
<style>
h1 {
color: antiquewhite;
}
</style>
<link rel="stylesheet" href="css.css">
</head>
<body>
</body>
<h1 style="color: red;">Hello World</h1>
<h1>Hello World</h1>
</html>