HTML Code Editor

Edit and preview HTML code in real-time.

Options de l'éditeur
Éditeurs de code
HTML Code
CSS Styles
JavaScript Code
Statistiques du code
Nombre total de lignes

59

Nombre total de caractères

1356

Nombre total de mots

129

Lignes HTML

5

Lignes CSS

32

Lignes JavaScript

22

Aperçu en temps réel
Code HTML généré
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Code Editor Preview</title>
    <style>
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            font-family: Arial, sans-serif;
        }
        
        h1 {
            color: #333;
            text-align: center;
            margin-bottom: 20px;
        }
        
        p {
            color: #666;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .btn {
            background-color: #007bff;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        
        .btn:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Welcome to HTML Code Editor</h1>
        <p>This is a sample HTML content. You can edit this and see the live preview.</p>
        <button class="btn">Click Me</button>
    </div>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            const button = document.querySelector(".btn");
        
            if (button) {
                button.addEventListener("click", function() {
                    alert("Hello from HTML Code Editor!");
                });
            }
        
            // Add some interactive functionality
            const container = document.querySelector(".container");
            if (container) {
                container.addEventListener("mouseover", function() {
                    this.style.transform = "scale(1.02)";
                    this.style.transition = "transform 0.3s ease";
                });
        
                container.addEventListener("mouseout", function() {
                    this.style.transform = "scale(1)";
                });
            }
        });
    </script>
</body>
</html>
A powerful online HTML code editor with syntax highlighting and live preview. Perfect for writing, editing, and testing HTML code quickly. Features include real-time preview, syntax highlighting, and clean interface for efficient HTML development.