CSS · Selectors and cascade

::placeholder

Styles placeholder text. Placeholders are hints, not labels; always keep a visible label.

Syntax
::placeholder

Example

Try it

More in this group

::after ::before ::selection :active :checked :disabled :empty :first-child

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course