Source Code: (back to article)
<div id="removeClassExample" class="highlight text-large">
This element will have classes removed.
</div>
<button onclick="removeClass()">Remove Class</button>

<script>
function removeClass() {
const element = document.getElementById('removeClassExample');
element.classList.remove('highlight', 'text-large');
}
</script>

<style>
.highlight {
background-color: yellow;
}

.text-large {
font-size: 24px;
}
</style>