<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Image Gallery</title>
<style>
/* Basic styling for the gallery container and images */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f0f0f0;
}
.gallery {
display: grid;
grid-gap: 10px;
padding: 10px;
}
.gallery img {
width: 100%;
height: auto;
display: block;
border-radius: 8px;
}
/* Responsive columns */
@media (min-width: 1200px) {
.gallery {
grid-template-columns: repeat(4, 1fr);
}
}
@media (min-width: 900px) and (max-width: 1199px) {
.gallery {
grid-template-columns: repeat(3, 1fr);
}
}
@media (min-width: 600px) and (max-width: 899px) {
.gallery {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 599px) {
.gallery {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="gallery">
<img src="path/to/image1.jpg" alt="Image 1">
<img src="path/to/image2.jpg" alt="Image 2">
<img src="path/to/image3.jpg" alt="Image 3">
<img src="path/to/image4.jpg" alt="Image 4">
<img src="path/to/image5.jpg" alt="Image 5">
<img src="path/to/image6.jpg" alt="Image 6">
<!-- Add more images as needed -->
</div>
</body>
</html>