요소를 제거하려면 CSS에서 display none 속성 값을 사용하십시오. none 속성 값을 구현하는 예를 살펴보겠습니다. -
예시
이제 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
span {
background-color: orange;
color: white;
}
p.demo {
display: none;
}
span.demo1 {
display: inline;
}
</style>
</head>
<body>
<h1>Match Details</h1>
<div>
Match will begin at <p class="demo">9AM</p> 10AM on 20th December.
</div>
<div>
Match will end at <span class="demo1">5PM</span> on 20th December.
</div>
</body>
</html> 출력

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