css change color of a tag when clicked code example
Example 1: css onclick change color
<style>
.dabutton:focus {
background-color:yellow;
}
</style>
<button class="dabutton"></button> // <-- usage
Example 2: css color when clicked
element:focus