Write HTML, CSS, and JavaScript code below and see the result in real-time!
HTML
CSS
JavaScript
Output:
How To Use?
- Type or paste your HTML, CSS, or JavaScript code
- Example code that you can enter:
- HTML:
<h1>Welcome to Live Code Editor!</h1> <p>This is a simple example that combines HTML, CSS, and JavaScript.</p> <button id="clickButton">Click Me!</button> <div id="message" style="margin-top: 20px;"></div>
- CSS:
body { font-family: Arial, sans-serif; background-color: #f4f4f4; text-align: center; } h1 { color: #007bff; } button { padding: 10px 20px; font-size: 16px; background-color: #28a745; color: white; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #218838; } #message { color: #ff6347; font-size: 18px; font-weight: bold; }
- JavaScript:
document.getElementById("clickButton").addEventListener("click", function() { document.getElementById("message").textContent = "The button has been clicked!"; });
- Click on the "Run Code" button to see the result.