<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Sample Index Page</title>

    <style>
        /* Basic, responsive styling */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background: #f4f4f4;
        }
        header {
            background: #333;
            color: white;
            padding: 15px;
            text-align: center;
        }
        main {
            padding: 20px;
            max-width: 900px;
            margin: auto;
            background: white;
            border-radius: 6px;
        }
        .btn {
            padding: 10px 16px;
            background: #4285f4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .btn:hover {
            background: #3367d6;
        }
        input, textarea {
            width: 100%;
            margin: 8px 0;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        footer {
            text-align: center;
            padding: 15px;
            background: #eee;
            margin-top: 30px;
        }
    </style>

    <script>
        // Simple form validation
        function validateForm() {
            const name = document.getElementById('name').value.trim();
            if (!name) {
                alert("Please enter your name.");
                return false;
            }
            return true;
        }
    </script>
</head>

<body>
    <header>
        <h1>Welcome to My Sample Page</h1>
    </header>

    <main>
        <h2>About</h2>
        <p>This is a simple sample index.html page demonstrating HTML, CSS, and a bit of JavaScript.</p>

        <h2>Contact Form</h2>
        <form onsubmit="return validateForm()">
            <label for="name">Name:</label>
            <input id="name" type="text" placeholder="Enter your name" required />

            <label for="message">Message:</label>
            <textarea id="message" rows="4" placeholder="Your message..."></textarea>

            <button class="btn" type="submit">Submit</button>
        </form>
    </main>

    <footer>
        <p>© 2026 Sample Website</p>
    </footer>
</body>
</html>
