Edit CSS against live sample HTML.
Runs in this browser. Nothing is uploaded.
CSS playground opens on the CSS editor. The sample document is already there: a heading that says Type specimen, a paragraph that says Edit this paragraph or its style, and CSS that sets a system font, one rem of padding, and an italic h1. Change the CSS, press Run preview, and the frame shows that document with your sheet. The Editor menu can switch to HTML or JavaScript, but the page starts you on the style.
The frame is sandboxed. HTML is copied through an allowlist of ordinary tags and a few attributes, so a script tag, an iframe or an event handler in the markup does not run. JavaScript, if you switch to it and type some, runs in a worker for at most five seconds, with a console and no document. The sample on this page leaves JavaScript empty, unlike the JavaScript playground, which starts on a snippet that logs 1, 4, 9 and clears the HTML.
Nothing is loaded from the network. Fonts, images and stylesheets you reference by URL will not arrive. The preview is a new frame each time you press Run preview. Close preview removes it.
Editor CSS. The starting sheet sets body to system-ui and 1rem padding, and h1 to italic. HTML is the Type specimen heading and one paragraph.
Run preview shows the heading in italic and the paragraph padded, inside the sandboxed frame. No external file is loaded.
Starting on CSS is the point. The HTML playground uses the same frame and starts on the markup instead.
No. Markup is copied tag by tag from an allowlist. script, iframe and event handlers are not copied. JavaScript runs only from the JavaScript editor, in a worker, with no DOM.
No. The frame’s policy blocks network loads. Use fonts the browser already has, such as the sample’s system-ui.
It starts on the JavaScript editor, with empty HTML and a snippet that logs the squares 1, 4 and 9. This page starts on CSS and keeps the specimen HTML.
Up to five seconds, then the worker is stopped. The console keeps a limited number of lines.