/*FirstCSS.css*/
p {
color: green;
font-size: 20px;
}
.text {
color: purple;
font-size: 20px;
}
#FirTxt {
color: skyblue;
font-size: 20px;
}
/* * { } 为通配符选择器 */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSSPract</title>
<!--内部样式-->
<style>
p {
color: green;
font-size: 20px;
}
</style>
<!--外部样式-->
<link rel="stylesheet" href="./css/FirstCSS.css">
</head>
</head>
<body>
<!--行内写法-->
<p style="color: green; font-size: 20px;">This is my first time trying CSS.</p>
<!--一个标签可以有多个类-->
<p class="text">This is my first time trying CSS.</p>
<p id="FirTxt">This is my first time trying CSS.</p>
</body>
</html>