ID selector

noun

say it: “EYE-DEE suh-LEK-ter” /ˌaɪ ˈdiː səˈlɛktər/

A CSS selector starting with # that picks the one element with that id.

What is an ID selector?

An ID selector starts with # and picks the one element with that id. It is very specific, so it is hard to override later.

#site-header { height: 64px; }
/* <header id="site-header"> */

In a sentence

  • “The id selector #cart styles the one cart box on the page.”

Level: Novice · More CSS terms at this level

Updated