Button active style with keyboard
HTML
<button type="submit">Click me and I give you a!</button>
CSS
button:focus {
outline: 1px dotted grey;
}
button:active {
outline-width: 5px
}
JavaScript
var buttons = document.getElementsByTagName('button');
for (var i=0; i<buttons.length; i++) {
buttons[i].onclick = function(e){
this.innerHTML += '!'
}
}