Markup / Web
HTML / CSS Playground
Live HTML + CSS preview - edit on the left, see results on the right.
Runtime: Native iframe
Code
Preview
About this playground
Write HTML, CSS and inline <script> JavaScript with a live side-by-side preview. The preview runs in a sandboxed iframe with scripts allowed but no parent-origin access, so it's safe to experiment. Open the rendered page in a standalone tab for a full-window preview.
FAQs
Can I include external CSS / JS?
Yes - link to any public CDN (cdn.jsdelivr.net, unpkg, esm.sh). External requests are subject to normal CORS rules.
Is the iframe sandboxed?
Yes - scripts are allowed but the iframe doesn't share origin with the parent, so it can't read this page's cookies or localStorage.
Why doesn't my <script> see this page's variables?
Sandboxing isolates the iframe. Your script runs in a fresh JS realm. Use postMessage if you need cross-frame communication.
Does Tailwind / React work?
You can pull both from a CDN. Tailwind via the Play CDN (cdn.tailwindcss.com), React via esm.sh. They're chunky downloads but run fine for demos.