Demonstration of Various HTML Concepts
Demonstration of Various HTML Concepts
h3 {
margin-bottom: 20px;
font-size: 1.5rem;
color: #444;
}
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
max-width: 1000px;
margin: 0 auto;
}
.gallery a {
display: block;
overflow: hidden;
position: relative;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease-in-out;
}
.gallery a:hover {
transform: scale(1.05);
}
.gallery img {
width: 100%;
height: 200px; /* Set a fixed height for consistency */
object-fit: cover; /* Ensures the image covers the area without distortion */
border-radius: 10px;
transition: transform 0.3s ease-in-out;
}
.gallery img:hover {
transform: scale(1.1);
}
</style>
</head>
<body>
<h3>Our Image Gallery</h3>
<div class="gallery">
<a href="https://www.google.com" target="_blank">
<img src="https://encrypted-tbn0.gstatic.com/images?
q=tbn:ANd9GcQtr3JwlzQFRT84UebCo5yAZDhc9cUOiFA11w&s" alt="Nature Scene">
</a>
<a href="https://www.google.com" target="_blank">
<img src="https://rukminim3.flixcart.com/image/850/1000/jjbqufk0/poster/r/h/h/large-
vlnature00091a-natural-scene-of-mountain-near-lake-vinyl-original-imaeh9vdnj9xxfau.jpeg?
q=90&crop=false" alt="City View">
</a>
<a href="https://www.google.com" target="_blank">
<img src="https://images.unsplash.com/photo-1494548162494-384bba4ab999?
w=900&auto=format&fit=crop&q=60&ixlib=rb-
4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8N3x8c3Vuc2V0fGVufDB8fDB8fHww" alt="Sunset
Landscape">
</a>
</div>
</body>
</html>
<!-- x) Embed Audio and Video -->
<h3>Multimedia Content</h3>
<p>Listen to this audio clip:</p>
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Watch this video:</p>
<video controls width="320">
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<!-- xi) Types of CSS -->
<h3>CSS Demonstration</h3>
<p style="color: blue;">This is an example of inline CSS.</p>
<p class="external-css">This text uses internal CSS styling.</p>
</body>
</html>