Key facts
How does placeholder behave?
placeholder is a hint for empty text-like fields. It is never submitted, it is styled with ::placeholder, and it is not a reliable accessible name.
| Fact | Detail |
|---|---|
| Where it works | On <input> types text, search, url, tel, email, password and number, and on <textarea>. It is ignored on checkbox, radio, file and date inputs and on <select>. |
| Not submitted | The placeholder is never sent. An untouched field sends an empty value, so required still fails. |
| Line breaks | Allowed in a <textarea> placeholder, but not in an <input> placeholder. |
| Styling | Use the ::placeholder pseudo-element. Firefox lowers its opacity by default, so set opacity: 1 to get the exact color. |
:placeholder-shown | This CSS pseudo-class matches a field while its placeholder is visible, which is handy for floating-label effects. |
| Accessibility | It is not a reliable accessible name. Screen readers handle it inconsistently, so every field still needs a <label>. |
Sources: WHATWG HTML Standard: the placeholder attribute · MDN: input placeholder




