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