-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.html
64 lines (59 loc) · 2.74 KB
/
web.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Design Guide</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 0; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; margin: 10px; text-decoration: none; font-size: 18px; }
.container { padding: 20px; }
footer { background: #222; color: white; padding: 10px; position: fixed; bottom: 0; width: 100%; }
.hidden { display: none; }
.form-container { display: flex; flex-direction: column; align-items: center; }
.form-container input, .form-container textarea { width: 80%; max-width: 400px; margin: 5px; padding: 8px; }
.form-container button { padding: 10px 20px; background: #28a745; color: white; border: none; cursor: pointer; }
</style>
</head>
<body>
<nav>
<a href="#" onclick="showPage('home')">Home</a>
<a href="#" onclick="showPage('styles')">Styles</a>
<a href="#" onclick="showPage('contact')">Contact Us</a>
</nav>
<div id="home" class="container">
<h1>How to Design a Website</h1>
<p>To create a website, you need to plan your design, structure your HTML, style using CSS, and add interactivity with JavaScript.</p>
</div>
<div id="styles" class="container hidden">
<h1>CSS Styling Guide</h1>
<p>Here are some basic CSS styles:</p>
<ul>
<li><strong>Background Color:</strong> Use <code>background-color</code> to change the background.</li>
<li><strong>Font Styling:</strong> Use <code>font-family</code> and <code>font-size</code> for text.</li>
<li><strong>Box Model:</strong> Margins, padding, and borders help in layout.</li>
</ul>
</div>
<div id="contact" class="container hidden">
<h1>Contact Us</h1>
<div class="form-container">
<input type="text" placeholder="Your Name">
<input type="email" placeholder="Your Email">
<textarea placeholder="Your Message"></textarea>
<button onclick="alert('Message Sent!')">Submit</button>
</div>
</div>
<footer>
<p>© 2025 Website Design Guide. All rights reserved.</p>
</footer>
<script>
function showPage(pageId) {
document.getElementById('home').classList.add('hidden');
document.getElementById('styles').classList.add('hidden');
document.getElementById('contact').classList.add('hidden');
document.getElementById(pageId).classList.remove('hidden');
}
</script>
</body>
</html>