hover

.element {
	width: 300px;
	height: 300px;
	color: black;
	background-color: yellow;
}

/* 마우스를 올렸을 때 글씨와 배경 색상 변경 */
.element:hover {
	color: white;
	background-color: red;
}

focus

/* 사용자 상호작용을 통해 포커스 되었을때, 경계선 지정 */
input:focus, select:focus {
	border: 1px solid red;
}1

before, after

.element1:before {
	content: "이전에 들어갈 문구";
	color: blue;
}

.element2:after {
	content: "홍길동";
}

.element3:before {
	content: ""; /* 문구가 들어가지 않는다면 빈문자열 넣기 */
	width: 15px;
	height: 15px;
	background-color: blue;
}

last-child

<ul>
	<li>첫번째 요소입니다.</li>
	<li>두번째 요소입니다.</li>
	<li>세번째 요소입니다.</li>
	<li>마지막 요소입니다.</li>
</ul>

<style>
	/* 마지막 요소의 글자 색깔을 빨간색으로 지정 */
	li:last-child {
		color: red;
	}
</style>

visited