Free Online CSS Playground
Edit HTML and CSS side by side and watch the result update live. Try layouts, colours, animations and transitions without setting up a project.
Auto-run is on, so the preview updates as you type. Scripts do not run in this preview.
Preview
How to use
Edit the markup in the HTML tab.
Switch to the CSS tab and write your styles. They are applied to the HTML as you type.
Watch the preview update on the right.
Copy the code in the current tab, download a zip of your files or clear the editor with the icons above it.
Open the full screen editor for more room, and use the A buttons to resize the text.
Press Format to tidy the tab you are editing, or untick Wrap long lines to scroll sideways instead.
Why use this tool
HTML and CSS tabs
Keep your markup and your styles apart, like a real project.
Live preview
See every change a moment after you type it.
Modern CSS
Uses your browser's own rendering, so flexbox, grid, custom properties and animations work as they do on a real page.
Copy or download
Copy the code in either tab with one click, or download a zip with the finished page and your HTML and CSS as separate files.
One-click formatting
Tidy the indentation and spacing of the tab you are editing with one click or Shift + Alt + F.
Comfortable editor
Resize the text, switch line wrapping on or off, or go full screen with the editor and preview side by side.
About this tool
Write HTML and CSS side by side and watch the result update live. Use this online CSS editor to try flexbox and grid layouts, tune colours, shadows and gradients, build transitions and animations, or debug a style without setting up a project. Switch between the HTML and CSS tabs as you work, then download the finished page and files when you are done.
This CSS playground has an HTML tab and a CSS tab side by side, and the preview updates as you type. It is a quick way to try a flexbox or grid layout, tune colours, shadows and gradients, build a transition or animation, or work out why a style is not applying. There is nothing to install.
When you are done, copy the code or download the finished page and files. To tidy or shrink a style sheet, use the CSS Formatter, and for Sass use the Sass Playground.
Frequently asked questions
No. The CSS Playground uses plain CSS exactly as your browser understands it.
Yes. Keyframe animations, transitions and transforms all work in the preview.
Yes, if the font is available over https, for example through an import or a link in your HTML.
Yes. If your HTML tab contains a whole document, the CSS is added to its head, after any styles you already wrote there.
Yes. Press Format, or Shift + Alt + F while you are typing, to tidy the tab you are editing. If the code has a syntax error it is left unchanged and the problem is shown under the editor.
Yes. Untick Wrap long lines under the editor and it scrolls sideways instead. Your choice is remembered on this device.
Write your HTML in the HTML tab and your CSS in the CSS tab. The preview updates as you type.
Yes. Modern CSS such as flexbox, grid, custom properties, transitions and animations works in the preview.