HTML CSS examples for CSS:Introduction
Set color value to initial
<!DOCTYPE html> <html> <head> <style> div {<!-- ww w . j a v a2s . c o m--> color: red; } </style> </head> <body> <div> <h1 id="bc">Hello World</h1> <ul> <li id="a">Item one</li> <li id="b">Item two</li> <li id="c">Item three</li> </ul> </div> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("b").style.color = "initial"; } </script> </body> </html>