set css property using document.queryselector code example Example: queryselector document.querySelector(".example");