Scoreling
Markup

Styling lives in stylesheets, not attributes

Low impact · weight 2 · worth up to 0.9 points of the total score

Why it matters

Inline style attributes cannot be cached, overridden by a stylesheet, or covered by a Content Security Policy that forbids inline styles. In quantity they also bloat every HTML response.

How to fix it

Move repeated inline styles into CSS classes and keep style attributes for values genuinely computed at runtime.

Check a page for this, and the other 41 checks at once

More Markup checks

See all checks