정의
- select와 declaration을 함께 묶어 ruleset이라고 부름
- 아래 예시의 first-child, hover 등을 pseudo-class라고 함
- pseudo-class는 selector 뒤에 붙어 특별한 조건을 명시하는 키워드임
예시
<!DOCTYPE html>
<html>
<head>
<style>
p:first-child{
background-color: green;
}
p:hover{
background-color: blue;
}
</style>
</head>
<body>
<div>
<p>Hello</p>
<p>World</p>
</div>
</body>
</html>