A class selector is a CSS selector which is used to select all elements in a document which have a class attribute of the same name. Unlike id selectors, class selectors can be used to set the style for multiple elements in the same document. Class selectors are handy for applying a rule to multiple specified elements.