queryselector from dom element code example Example: queryselector javascript var element = document.querySelector("#myid .myclass p");