May 2019
Beginner to intermediate
466 pages
10h 44m
English
Historically, JavaScript started off using selectors based on the id attribute and the names of the HTML elements (the tags). Later on, the CSS specification came with a more powerful set of selectors, employing not only the class, the id, and the tags, but also the presence of attributes and their values, states of the elements (such as focused or disabled), and more specific element hierarchies that take into account relationships.
Here are a few examples of CSS selectors that can be used to target the previously discussed <a> tag:
Read now
Unlock full access