둘 이상의 CSS 클래스를 추가하려면 class를 사용해야 합니다. HTML의 속성
예시
다음 코드를 실행하여 HTML의 요소에 대해 둘 이상의 CSS 클래스를 구현하는 방법을 배울 수 있습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
h2.myClass1 {
background-color: black
}
.myClass2 {
color: red;
}
</style>
</head>
<body>
<h2 class = "myClass1 myClass2">Tutorialspoint</h2>
<h3>Simply Easy Learning</h3>
</body>
</html>