CSS Selectors
CSS selectors for targeting HTML elements by type, class, and attributes. This category documents 19 CSS selectors entries, and each page gives you the full syntax, the accepted values with explanations, a working example, and browser support data. The entries are: Type Selector, Class Selector, ID Selector, Universal Selector, Descendant Combinator, Child Combinator, Adjacent Sibling, General Sibling, Attribute Selector, Attribute Contains, Attribute Starts With, Attribute Ends With, Attribute Contains Word, Attribute Contains Prefix, Column Combinator, :host(), :host-context(), ::slotted(), ::part(). Not sure where to start? Type Selector and Class Selector are among the most used entries in this category. The selectors category is one of 21 categories in the CSS Reference, which covers 841+ entries in total. You can also search across every category from the search page, learn the topic end to end in the guides, or return to the CSS Reference homepage.