query selector for html with javascript code example Example: queryselector document.querySelector(".example");