<!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>element_selector</title>
<style>
/*
1.元素选择器。
作用:根据元素明来选中指定的元素
语法:元素名{}
举例:
p{} 选中所有的p元素然后对其进行操作。
h1{} 选中所有的h1元素然后对其进行操作。
div{} 选中所有的div元素然后对其进行操作。
*/
p{
color: orange;
}
</style>
</head>
<body>
<p>这是第1个p元素</p>
<p>这是第2个p元素</p>
<p>这是第3个p元素</p>
</body>
</html>
运行结果: