HTML Guides for string
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The CSS min-width property has a quoted string as its value, such as "" or "200px", and strings are not valid for this property.
min-width accepts a length (200px, 12rem), a percentage (50%), 0, a calc() expression, the keywords auto, min-content, max-content and fit-content, and CSS-wide keywords like inherit. Anything wrapped in quotes is a CSS string, so min-width: "200px" is rejected even though min-width: 200px is fine. The validator repeats the string in the message: “""” means the declaration was min-width: "", an empty string.
An empty string usually comes from a template or page builder that wraps the value in quotes and prints nothing when the setting is blank. Quoted lengths often come from code copied out of JavaScript or JSON, where values are written as strings (minWidth: "200px").
To fix it, remove the quotes. If there is no value to set, remove the whole declaration; the default min-width is auto. Other bad values produce different messages: a number without a unit (min-width: 200) reports that only 0 can be unitless, and an unknown keyword (min-width: none) reports that values are not recognized.
Invalid example
<style>
.sidebar {
min-width: "";
}
.card {
min-width: "200px";
}
</style>
Valid example
<style>
.card {
min-width: 200px;
}
</style>
The empty declaration on .sidebar is gone, and the .card value has no quotes.
The opacity property takes a number such as 0.5 or a percentage such as 50%, so a quoted value like "" is invalid.
opacity sets how transparent an element and its content are, from 0 (fully transparent) to 1 (fully opaque, the initial value). Quotes turn whatever is between them into a CSS string, and opacity doesn't accept strings. "" is an empty string, and "0.5" fails for the same reason even though the number inside it is fine. Browsers drop the declaration, so the element keeps the opacity set by other rules, or stays fully opaque.
The empty pair of quotes often comes from a template or script that wraps the value in quotes and has nothing to print, as in style='opacity: "{{ opacity }}"' when the setting is empty. Write the number without quotes, or leave the declaration out when there's no value. Any other value the property can't parse, such as the word undefined printed by a script, gets the same message.
Numbers outside the 0 to 1 range, such as 1.5, are valid: browsers clamp them to the nearest limit. Global keywords such as inherit work too.
Invalid example
<div class="banner" style='opacity: "";'>
<p>Spring offers</p>
</div>
Valid example
<div class="banner" style="opacity: 0.8;">
<p>Spring offers</p>
</div>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries