Editor+
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Awesome Page</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: #333; } .card { background: white; padding: 2rem; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0,0,0,0.1); text-align: center; max-width: 400px; } h1 { color: #2c3e50; margin-bottom: 1rem; } p { line-height: 1.6; color: #666; } .btn { display: inline-block; margin-top: 1.5rem; padding: 0.8rem 1.5rem; background: #3498db; color: white; text-decoration: none; border-radius: 0.5rem; transition: background 0.3s ease; } .btn:hover { background: #2980b9; } </style> </head> <body> <div class="card"> <h1>Hello World!</h1> <p>Welcome to your new HTML playground. Edit the code on the left and see the magic happen on the right!</p> <a href="#" class="btn">Click Me</a> </div> <script> const btn = document.querySelector('.btn'); btn.addEventListener('click', (e) => { e.preventDefault(); alert('You clicked the button!'); }); </script> </body> </html>
preview://
index.html