It refers to the HTML element to which the CSS rule or declaration is applied thus, specifying to the browser which element on a web page to style. One or more HTML elements can be given as selectors and is classified as
Type selector – It is the simple selector which references a type of HTML element, and will style all tags that match, like if a p type selector is styled then that style is applied to all p elements.
Grouping Selectors – It is used to apply same rule to more than one selector. Grouping is done by using a comma after each selector, as shown
h1, h2 {
padding: 0 10px 0 0; text-align: left;
}
padding: 0 10px 0 0; text-align: left;
}
Grouping prevents repetition of the same declarations for each selector.