-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
116 lines (100 loc) · 3.17 KB
/
Copy pathindex.html
File metadata and controls
116 lines (100 loc) · 3.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home Page</title>
<style>
/* Body styling */
body {
font-family: Arial, sans-serif;
background-color: #f4f7fb;
margin: 0;
padding: 0;
}
/* Header */
header {
background-color: #3498db;
color: white;
padding: 20px 0;
text-align: center;
font-size: 28px;
font-weight: bold;
}
/* Navigation bar */
nav {
background-color: #2c3e50;
text-align: center;
padding: 10px 0;
}
nav a {
color: white;
text-decoration: none;
margin: 0 15px;
font-weight: bold;
font-size: 16px;
}
nav a:hover {
color: #f1c40f;
transition: 0.3s;
}
/* Main container */
.container {
width: 80%;
margin: 30px auto;
background-color: #ffffff;
padding: 25px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
border-radius: 10px;
}
h1 {
text-align: center;
color: #2c3e50;
margin-bottom: 30px;
}
/* Image styling */
.images {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.images img {
width: 300px;
height: 200px;
margin: 10px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
object-fit: cover;
}
/* Explanation text */
p.explanation {
text-align: center;
color: #34495e;
font-size: 16px;
margin-top: 20px;
}
</style>
</head>
<body>
<header>Welcome to My HTML Assignment</header>
<!-- Navigation -->
<nav>
<a href="index.html" title="Home">Home</a>
<a href="list.html" title="Lists Example">Lists</a>
<a href="Tablepage.html" title="Table">Tables</a>
<a href="formating.html" title="Text Formatting Reference">Formatting</a>
<a href="form.html" title="About Page">Form</a>
<a href="About.html" title="About Page">About</a>
</nav>
<!-- Main Content -->
<div class="container">
<h1>Enhancing Web Pages with Images</h1>
<div class="images">
<img src="https://images.unsplash.com/photo-1624953587687-daf255b6b80a?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTF8fGNvZGluZyUyMGltYWdlc3xlbnwwfHwwfHx8MA%3D%3D" alt="School Building" width="300" height="200">
<img src="https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8Y29kaW5nJTIwaW1hZ2VzfGVufDB8fDB8fHww" alt="Students in Classroom" width="300" height="200">
</div>
<p class="explanation">
Images are essential in web pages because they enhance visual communication and accessibility. Using descriptive alt text helps users understand the content, even if the image cannot be displayed.
</p>
</div>
</body>
</html>