An id selector is a CSS selector which is used to select an element in a document which has an id attribute of the same name. Since the id attribute must be unique within a given document, the id selector can be used for only one element within a document. id selectors are handy for applying a stylesheet rule to a particular element.