1//remove a css class from an element
2document.getElementById("myElementID").classList.remove("class_name");
1.myclass {
2 border:1px solid black;
3 background-color: #d2d2d2;
4 height:20px;
5 width:60px;
6}
7/*If you give this class to a div in html, it will get the styles you gave
8to that class. You can add multiple classes to a div, and multiple divs
9can get that class. */
10/* I hope I helped! */
1<ul class="legend">
2 <li><span class="greendot"></span>Text</li><br></br>
3 <li><span class="yellowdot"></span>Text</li><br></br>
4 <li><span class="reddot"></span>Text</li><br></br>
5 <li><span class="blackdot"></span>Text</li><br></br>
6</ul>
1<style>
2.myclass { /* CLASS CREATED */
3 background-color: transparent;
4 height:50px;
5 width:50px;
6}
7</style>
8<body>
9<div class="myclass"></div>
10<body>