::placeholder
noun
say it: “DUB-ul KOH-lun PLAYS-hohl-der” /ˈdʌbəl ˈkoʊlən ˈpleɪshoʊldər/ or “PLAYS-hohl-der” /ˈpleɪshoʊldər/
A pseudo-element that styles the hint text shown inside an empty text box, such as its color.
What does ::placeholder do?
::placeholder styles the hint text shown in an empty input.
input::placeholder { color: #999; font-style: italic; }
In a sentence
- “The hint in the search box was too pale to read, so I darkened it with ::placeholder.”
Level: Apprentice · More CSS terms at this level
Updated