Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<script src="https://www.w3schools.com/lib/w3.js"></script>
<style>
.myclass {
background-color: yellow;
font-size: 30px;
color: white;
}
</style>
<body>
<button onclick="w3.toggleClass('#mydiv','myclass')">click</button></p>
<div id="mydiv" class="myclass">
<h1>Hello world!</h1>
</div>
</body>
</html>
The most helpful W3.JS solutions
How to fill a dropdown using w3.js ?W3.JS Click to see more ... 1.1K 147