var el = document.getElementById("search-field");
This will give you an element with the id attribute set to "search-field".
Selecting multiple elements inside a divLet's say that you have a div with a div inside. This div has multiple divs inside it and you want to select some of them.
var products = document.getElementById("products-wrapper").querySelectorAll(".product");
This will give you a list of all elements inside "products-wrapper" with the class attribute set to "product".