Placeholder vs label in forms: which should you use?

Placeholders vanish when people type, so they can't check their answers. Why every form field needs a visible label, and when a hint is fine.

Close-up of a designer filling in a sign-up form on a tablet with a stylus.
On this page 4 min read
  1. 01What's the difference between a label and a placeholder?
  2. 02Why do placeholder-only forms cause mistakes?
  3. 03Aren't placeholders cleaner?
  4. 04When is a placeholder OK?
  5. 05What about floating labels?
  6. 06How do I lay out labels in a real form?

Key takeaways

  1. [object Object]
  2. [object Object]
  3. [object Object]
  4. [object Object]
  5. [object Object]
  6. [object Object]

Someone is halfway through your form. They click the next box, start typing, and the gray hint is gone. Was this one for their name or the company name? They delete what they typed to see the hint again. Or they guess. Or they close the tab.

The fix is simple. Use a visible label above every field, and keep placeholders for a short format hint at most. Placeholder text vanishes when people type, it often fails contrast and it is not a reliable label for screen readers.

What's the difference between a label and a placeholder?

Short answer: A label sits outside the field and stays. A placeholder sits inside the field and disappears when you type.

The label says what the field is: "Email". The placeholder shows an example of what goes in it: "name@company.com".

The trouble starts when the placeholder does the label's job. It looks clean in a mockup, because in a mockup every field is empty. Your visitors only see the form that way at the very start. After that they're looking at a form with their own typing in it and nothing else.

Why do placeholder-only forms cause mistakes?

Short answer: Once someone types, the form stops telling them what each box is for.

Walk through it as the person filling it in.

Before: a form with four boxes. Inside them, in gray: "Your name", "Business name", "Name on bank account", "Email". No labels. It looks tidy.

They type their name in the first box. The hint is gone. They type the business name. That hint is gone too. Then their phone buzzes.

They look back. The third box has the cursor in it and no hint. Was this the business name again, or the name on the account? The only way to find out is to delete what they typed.

It gets worse at the end. Before sending, careful people check their answers. In this form there are four answers and no questions. "Maria Santos" and "Maria L. Santos" sit in two boxes, and nothing says which is which.

Browser autofill adds to it. It can fill all four boxes at once, sometimes in the wrong places, and the person never sees a single hint.

After: the same four fields with a label above each one. The labels stay, empty or filled. There's nothing to remember and nothing to guess.

Aren't placeholders cleaner?

Short answer: They look emptier, but they aren't easier. A label adds one line per field and removes the guessing.

Placeholder-only forms are popular because the form looks shorter. It isn't. It asks the same number of questions. If your form feels long, cut a field you don't need. Don't hide the labels.

There's also a contrast problem. Placeholder text is light gray on purpose, so it doesn't look like a real answer. WCAG, the standard for web accessibility, asks for a contrast ratio of at least 4.5:1 for normal text. Many placeholder grays are lighter than that, so they're hard to read with weaker eyesight or on a phone in sunlight. Make the gray darker and the field can look filled in already, so people skip it. You lose either way.

Then screen readers. A placeholder is not a dependable label for people who use them, and the HTML standard itself says the placeholder attribute should not be used as an alternative to a label. A real label also gives you something for free: tap the label and the cursor jumps into the field, which helps on a phone.

When is a placeholder OK?

Short answer: As a short format example next to a real label, and only if the form still works without it.

Good uses:

  • Label "Email", placeholder "name@company.com".
  • Label "Website", placeholder "https://".
  • A single search box with a search icon or button beside it. It still needs a label in the code for screen readers.

Bad use: rules. "At least 8 characters with one number" inside the password box vanishes at the exact moment someone needs it. Put rules under the field as help text that stays.

Here's a quick test. Delete every placeholder in your form. Can someone still fill it in? If yes, your placeholders are hints and you're fine. If no, they're doing a label's job.

What about floating labels?

Short answer: Better than placeholder-only, but still not as clear as a label that sits above the field from the start.

A floating label starts inside the box and shrinks to the top edge when you click in. It stays visible, which solves the main problem.

It has costs. The shrunken label is often very small. The empty field can still look filled in. And it leaves little room for a format hint. My default is the plain version: label above, box below.

How do I lay out labels in a real form?

Short answer: Put the label above the field and close to it, with a bigger gap before the next field.

This is the Law of Proximity, one of the 5 Laws of UX. Keep related things close together. A common beginner mistake is the same gap everywhere, so a label floats halfway between two boxes and you can't tell which one it belongs to. For example, 6px between a label and its box and 20px between fields makes each pair read as one unit.

Above the field also works well on a phone. The eye runs straight down one line, and long labels have room.

Take most care with the forms people fill in once and rely on for a long time. Say you run a payroll tool. The bank details form is filled in once, then used for every payment after that. A number typed into the wrong box doesn't cause one mistake. It causes the same mistake every month. Those are the forms where a clear label above each field matters most, along with help text that stays and a review step before saving.

If people start your form and don't finish it, book a call. Send me the link and we'll go through it field by field. I reply within a day.

Questions

  • Only as a short example of the format, like a sample email address. Never as the only thing that tells people what the field is for.

  • Above works for most forms. It gives the eye one straight line down and it fits on a phone. Labels on the left need width that small screens don't have.

  • Yes. If most fields are required, mark the few optional ones with "(optional)" in the label. Don't rely on color alone to show it.

Share this article

Have a project in mind?

Book a short call. We'll talk through what you're building, and I'll tell you how I can help.

Length
15 minutes
Where
Cal Video
Time zone
Metro Manila

Book a discovery call

Pick a time that suits you

The calendar runs on Cal.com, which sets its own cookies. Allow them to load it here, or email me and I’ll reply within a day.

Email me