Missing Form Labels
Every form input needs a visible label that's programmatically associated with it. Screen readers announce the label when a user focuses the input. Without it, users don't know what information to enter.
How common is this error?
We ran this validator over the home page of the Tranco top 5,000 websites in August 2026. 1,133 of the 2,656 sites we could reach hit it. That makes it the 6th most common HTML problem we found, across 4,895 occurrences. See the full study.
Most frequent wording: <input> element does not have a <label>
Why It Matters
Missing form labels make forms unusable for screen reader users. They also reduce usability for everyone: clicking a label focuses its associated input (larger click target). WCAG 2.1 Level A requires all form inputs to have labels.
Common Causes
- Relying on placeholder text to describe an input instead of a real label.
- Designing compact or icon-only inputs (search, filters) with no associated label.
- Generating form fields dynamically without pairing each with a <label>.
Code Examples
<input type="email" placeholder="Email"> <input type="password" placeholder="Password">
<label for="email">Email</label> <input id="email" type="email"> <label for="password">Password</label> <input id="password" type="password">
How to Fix
- 1Add a <label> element with a for attribute matching the input's id.
- 2Alternatively, wrap the input inside the label: <label>Email <input type="email"></label>.
- 3Placeholder text is NOT a substitute for labels. It disappears when the user types.
- 4For icon-only inputs, use aria-label: <input aria-label="Search" type="search">.
Frequently Asked Questions
Can I use placeholder text instead of a label?
How do I associate a label with an input?
What about inputs that visually cannot have a label, like a search box?
Check Your HTML Now
Our validator detects this error automatically and shows the exact line number.
Open HTML ValidatorRelated HTML Errors
Missing Alt Attribute on Images
A missing alt attribute is the top accessibility error and a lost SEO chance. Learn why every img needs alt text and how to write it well for screen readers.
Duplicate ID Attributes
A duplicate id breaks JavaScript, anchor links, and screen reader navigation. Learn how to find and fix duplicate id attributes in your HTML the right way.
Missing Lang Attribute
A missing lang attribute confuses screen readers and browser translation. Learn why the html lang attribute matters for accessibility and SEO, and how to add it.