File size: 3,162 Bytes
8866126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test HTML Page</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            color: #333;
        }

        h1 {
            color: #0066cc;
            border-bottom: 2px solid #eee;
            padding-bottom: 10px;
        }

        .container {
            background-color: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 20px;
            margin-top: 20px;
        }

        button {
            background-color: #0066cc;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }

        button:hover {
            background-color: #0055aa;
        }

        #message {
            margin-top: 20px;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <h1>Test HTML Page</h1>

    <p>This is a simple HTML test page that demonstrates basic HTML structure and functionality.</p>

    <div class="container">
        <h2>Interactive Element Test</h2>
        <p>Click the button below to see a simple JavaScript function in action:</p>
        <button id="testButton">Click Me!</button>
        <p id="message"></p>
    </div>

    <div class="container">
        <h2>Sample Form</h2>
        <form id="testForm">
            <div style="margin-bottom: 15px;">
                <label for="name">Name:</label><br>
                <input type="text" id="name" name="name" style="width: 100%; padding: 8px; box-sizing: border-box;">
            </div>
            <div style="margin-bottom: 15px;">
                <label for="email">Email:</label><br>
                <input type="email" id="email" name="email" style="width: 100%; padding: 8px; box-sizing: border-box;">
            </div>
            <div style="margin-bottom: 15px;">
                <label for="message">Message:</label><br>
                <textarea id="message" name="message" rows="4"
                    style="width: 100%; padding: 8px; box-sizing: border-box;"></textarea>
            </div>
            <button type="button" id="submitButton">Submit</button>
        </form>
    </div>

    <script>
        // Button click event
        document.getElementById('testButton').addEventListener('click', function () {
            document.getElementById('message').textContent = 'Hello! The button was clicked at ' + new Date().toLocaleTimeString();
        });

        // Form submit event
        document.getElementById('submitButton').addEventListener('click', function () {
            const name = document.getElementById('name').value;
            if (name) {
                alert('Thanks for your submission, ' + name + '!');
            } else {
                alert('Please enter your name before submitting.');
            }
        });
    </script>
</body>

</html>