HTML Code Editor

Edit and preview HTML code in real-time.

Opções do Editor
Editores de Código
HTML Code
CSS Styles
JavaScript Code
Estatísticas do Código
Total de Linhas

59

Total de Caracteres

1356

Total de Palavras

129

Linhas HTML

5

Linhas CSS

32

Linhas JS

22

Pré-visualização ao Vivo
Código HTML Gerado
<!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.