xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Reset/Remove CSS Styles for Element</title>
<style>
/* Some custom styling */
body {
color: red;
font-size: 18px;
}
.container {
padding: 20px;
border: 1px solid black;
}
h1 {
color: white;
background: black;
}
p {
font-style: italic;
}
/* Revert CSS style of target element and its children */
.reset-style, .reset-style * {
all: revert;
}
</style>
</head>
<body>
<div class="container reset-style">
<h1>This is a heading</h1>
<p>This is a simple paragraph of text.</p>
</div>
<div><strong>Note:</strong> Add/Remove "reset-style" class on container div to see how it basically works.</div>
</body>
</html>