-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.htm
More file actions
119 lines (108 loc) · 2.49 KB
/
Example.htm
File metadata and controls
119 lines (108 loc) · 2.49 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Attractive Website</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
header {
background-color: #333;
color: white;
padding: 1rem 0;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
nav h1 {
margin: 0;
}
nav ul {
list-style: none;
display: flex;
gap: 1rem;
margin: 0;
padding: 0;
}
nav ul li {
margin: 0;
}
nav ul li a {
color: white;
text-decoration: none;
padding: 0.5rem 1rem;
transition: background-color 0.3s;
}
nav ul li a:hover {
background-color: #555;
}
section {
padding: 2rem 1rem;
max-width: 1200px;
margin: 0 auto;
}
section h2 {
margin-top: 0;
}
button {
padding: 0.5rem 1rem;
background-color: #333;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #555;
}
</style>
</head>
<body>
<header>
<nav>
<h1>My Website</h1>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<section id="home">
<h2>Welcome to My Website</h2>
<p>
This is a simple, attractive website built with HTML, CSS, and
JavaScript.
</p>
<button onclick="showAlert()">Click Me</button>
</section>
<section id="about">
<h2>About Us</h2>
<p>We provide amazing web development services.</p>
</section>
<section id="services">
<h2>Our Services</h2>
<p>We offer a wide range of web development services.</p>
</section>
<section id="contact">
<h2>Contact Us</h2>
<p>Get in touch with us for more information.</p>
</section>
<script>
function showAlert() {
alert("Button clicked!");
}
</script>
</body>
</html>