1h1 {
2 color: red;
3}
4
5In this CSS code example that sets the color of all h1s to red
6the "h1" is the selctor because we are applying this style to
7the h1s.
1div { color: red; } // the "div" in .css is a selector targeting all <div> elements
2simpleSelector = document.querySelectorAll()("div"); // all divs
3complexSelector = document.querySelector("div.user-panel.main input[name='login']") // the first <input> element with the name "login" (<input name="login"/>) located inside a <div> whose class is "user-panel main" (<div class="user-panel main">) in the document is returned