Skip to content

Limitations

  • Only static rules can be inlined: :hover, :focus, pseudo-elements and at-rules are kept in a style block, not applied.
  • Matching uses your browser’s selector engine; selectors it does not support are kept in the style block and reported.
  • Nothing is minified or validated: use the minifier and validator tools for that.

Privacy

Files are opened on your device and never uploaded. Previews block scripts, forms and remote images (which can be tracking pixels).

About the CSS Inliner

Inline CSS into style attributes with specificity, source order and !important applied like a browser. Keeps @media, :hover and existing inline styles safe.

How to use it

Examples

Questions

Which wins: a class rule or an existing inline style?
The inline style, as in a browser, unless the class rule uses !important. Specificity then source order decide between stylesheet rules.
Why is my @media rule not applied to inline styles?
Inline styles beat normal media-query rules. Add !important to the declarations inside the media query.

Free and runs in your browser. Sign in only if you want to save your work.