query selector select element by attribute code example Example: queryselector document.querySelector(".example");