w3schools document.queryselector code example
Example 1: js select element by css selector
// First Element:
document.querySelector('.class')
// Multiple Elements:
document.querySelectorAll('.class')
Example 2: queryselector
var el = document.querySelector(".myclass");
Example 3: queryselector javascript
var element = document.querySelector("#myid .myclass p");