-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbasicona.html
More file actions
58 lines (51 loc) · 1.44 KB
/
Copy pathbasicona.html
File metadata and controls
58 lines (51 loc) · 1.44 KB
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
<!DOCTYPE html>
<html lang="en">
<head
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basic HTML Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
color: #333;
margin: 0;
padding: 20px;
}
h1 {
color: #4CAF50;
}
button {
background-color: #008CBA;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
margin-top: 10px;
}
button:hover {
background-color: #005f73;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<h1>Welcome to My Basic HTML Page</h1>
<p>This is a simple web page with basic JavaScript and CSS.</p>
<button id="toggleButton">Click me!</button>
<p id="message" class="hidden">Hello, you clicked the button!</p>
<script>
// Weak JavaScript: Just toggles the message visibility
document.getElementById('toggleButton').onclick = function() {
var message = document.getElementById('message');
if (message.classList.contains('hidden')) {
message.classList.remove('hidden');
} else {
message.classList.add('hidden');
}
};
</script>
</body>
</html>