← All Tools
Code Playground
Live HTML, CSS & JavaScript editor with instant preview
▶ Run
Clear
Export HTML
Auto-run
⇄ Layout
HTML
<div class="demo"> <h1>Hello, World!</h1> <p>Edit the code and see changes live.</p> <button onclick="count++">Clicked: <span id="num">0</span></button> </div>
CSS
.demo { font-family: system-ui, sans-serif; max-width: 400px; margin: 2rem auto; text-align: center; } button { padding: 8px 24px; font-size: 1rem; border: 2px solid #333; border-radius: 6px; background: #fff; cursor: pointer; transition: all .15s; } button:hover { background: #333; color: #fff; }
JS
let count = 0; setInterval(() => { const el = document.getElementById('num'); if (el) el.textContent = count; }, 100);
Preview
Clear Console
✓ Copied!