About This HTML Issue
An invalid value was assigned to the margin-bottom CSS property, and the W3C validator rejected it because it does not match any accepted syntax for that property.
The margin-bottom property accepts a length (e.g., 10px, 2em), a percentage (e.g., 5%), auto, or the global keywords inherit, initial, revert, and unset. The validator raises this error when the value is misspelled, uses a wrong unit, is missing a unit entirely, or contains an otherwise unrecognized token.
Common causes:
- A bare number without a unit, like
margin-bottom: 10instead ofmargin-bottom: 10px. Zero is the only length value that does not require a unit. - A typo in the unit or keyword, like
margin-bottom: 10 px(with a space) ormargin-bottom: auто(mixed character encodings). - An invalid keyword, like
margin-bottom: none. Themargin-bottomproperty does not acceptnone.
Example with the error
<p style="margin-bottom: 10">This paragraph has an invalid margin.</p>
The value 10 is not valid because it lacks a unit.
Fixed example
<p style="margin-bottom: 10px">This paragraph has a valid margin.</p>
Adding a recognized unit like px, em, rem, or % fixes the error. If the intended value is zero, margin-bottom: 0 is valid without a unit.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.