Skip to main content
HTML Validation

CSS: “align-items”: X is not a “align-items” value.

About This HTML Issue

The CSS align-items property received a value the validator does not recognize, either because it is misspelled, unsupported, or used with incorrect syntax.

The align-items property controls how flex or grid items are positioned along the cross axis of their container. Valid values include stretch, flex-start, flex-end, center, baseline, start, end, self-start, self-end, and normal. Common mistakes include using justify-content values like space-between or space-around, which do not apply to align-items. Another frequent error is a typo such as centre instead of center.

When writing inline styles or <style> blocks that get validated, only recognized CSS values pass validation. The W3C validator checks CSS embedded in HTML and flags values it cannot match to the property's grammar.

Examples

Invalid usage

<div style="display: flex; align-items: space-between;">
  <p>Item</p>
</div>

The value space-between is not valid for align-items. It belongs to justify-content or align-content.

Fixed usage

<div style="display: flex; align-items: center;">
  <p>Item</p>
</div>

Replace the invalid value with one that align-items accepts. In this case, center vertically centers items within the flex container.

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

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.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries