ID selector

A CSS selector that matches the one element with a given id attribute, written with a hash such as #menu.

In more detail

An id should be unique in a document, so an ID selector matches at most one element. ID selectors carry the highest specificity of the plain selectors, which makes rules that use them hard to override.

Related terms

Taught in

References