CSS를 사용하여 배경색을 설정하려면 background-color 속성을 사용하십시오.
예시
이제 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline underline;
background-color: red;
}
</style>
</head>
<body>
<h1>Details</h1>
<p class="demo">Examination Center near ABC College.</p>
<p class="demo2">Exam begins at 9AM.</p>
</body>
</html> 출력

예시
이제 다른 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline underline;
}
</style>
</head>
<body style="background-color: orange;color: white;">
<h1>Details</h1>
<p class="demo">Examination Center near ABC College.</p>
<p class="demo2">Exam begins at 9AM.</p>
</body>
</html> 출력
