HTML Previewer
New here? Copy an example below, paste it into the box, and click Preview.
Simple page
<h1>Hello, world!</h1> <p>This is a plain HTML snippet.</p>
Styled card
<style>
.card { font-family: sans-serif; padding: 16px; border-radius: 12px; background: #eff6ff; color: #1d4ed8; }
</style>
<div class="card">
<h2>Styled card</h2>
<p>Inline <style> tags are rendered too.</p>
</div>Interactive button
<button id="btn">Clicked 0 times</button>
<script>
let count = 0;
document.getElementById("btn").addEventListener("click", () => {
count += 1;
document.getElementById("btn").textContent = `Clicked ${count} times`;
});
</script>