CSS Selectors Tutorials

In CSS, a selector tells the web browser what HTML element or elements to apply a CSS rule to. In other words, a selector tells the web browser what HTML element or elements to format.

Class Selector Tutorial
A class selector can be used to tell web browsers to apply a CSS rule to many HTML elements in a web page, even elements of different types and purposes.

ID Selector Tutorial
ID selectors are similar to class selectors, except ID selectors are meant to be used only once per document.

Universal Selector Tutorial
The universal selector is an denoted by asterisk (*). When used alone, the universal selector will tell the web browser to apply the CSS rule to all elements in the document.