Basic CSS Selectors
Get an understanding of three types of CSS selectors: type, class, and ID selector.
We'll cover the following
Basic three CSS selectors
CSS rules can select for elements in many different ways. The three basic kinds of selectors are:
type
selectors: It is used to select HTML elements by element name.class
selectors: It is used to select HTML elements by a specificclass
value.id
selectors: It is used to select an HTML element associated with a specificid
value.
The type
selector
Using a type
selector is as simple as typing the name of the element:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy