apply css to all elements code example Example: selet all elemnts var elems = document.body.getElementsByTagName("*");