Skip to content

Web Code Playground

Write and run HTML, CSS, and JavaScript with a live preview, responsive viewport presets, and an integrated console.

Web Code Playground

Web preview

Select Run to preview your page.

Console

0 entries

Run JavaScript to see logs and errors here.

Runs in your browserCtrl / ⌘ + Enter to run

Preview a small web demo and check the console

Add <button id="demo">Click me</button> in index.html. In script.js, use document.querySelector('#demo').onclick = () => console.log('Clicked'). Run the preview with Ctrl or Command + Enter, click the button, and check the Console. Switch to the phone viewport to see how the same page fits a narrow screen.

The preview blocks network requests and external assets. Use inline CSS and scripts or embedded images for self-contained examples. When the demo is ready, Download HTML combines the three source files into one file you can open in a browser.

Comments

Sign in or create an account to join the discussion.

Loading comments…