ZapKit

HTML, CSS and JavaScript playground

Try an idea, test a snippet or teach a concept: edit HTML, CSS and JavaScript side by side and watch the page update as you type.

What is a code playground?

A code playground is an editor that runs HTML, CSS and JavaScript instantly in the browser, without creating files or setting up a project. Learners use one to experiment, developers to isolate a bug or prototype a component, and teachers to demonstrate ideas live.

Edit each language in its own tab and the preview updates automatically, or switch to manual runs. Templates give you a working starting point, the console panel shows logged output and errors with the JavaScript line they came from, and the result can be downloaded as a single HTML file.

How to use the HTML, CSS and JavaScript playground

  1. 1.Write or load a template

    Start blank, or from a counter, card layout or console example.

  2. 2.Watch the preview

    It re-runs as you type, or press Run if you turn that off.

  3. 3.Check the console

    console.log output and errors appear under the preview.

Example: the counter template

A heading and a button, styled with CSS and wired up in JavaScript:

HTML
<button id="btn">Clicked 0 times</button>
JavaScript
count++ on each click and update the label
Console
count is 1, count is 2 …

A working interactive page in under a minute, downloadable as playground.html.

Safe by design

Your code runs in a sandboxed frame with no access to this page, your cookies or other sites' data, so experiments can't break anything. console.log, warnings, errors, unhandled promise rejections and alert() messages are captured and shown in the console panel.

The editor is deliberately simple: Tab indents with two spaces and line numbers help find errors. Download produces one self-contained HTML file with your CSS and JavaScript inside, ready to open locally or host anywhere.

Frequently asked questions

Can I use npm packages?

Load libraries from a CDN with a <script> tag in the HTML.

Is my code saved?

No. Download the HTML file to keep it.

Why doesn't alert() pop up?

Pop-ups are blocked in the sandbox; the message appears in the console instead.

Can it run TypeScript or React JSX?

Not directly. Plain JavaScript runs as written.

More Developer tools