Professional Documents
Culture Documents
Prac3 FSWD 22bce157
Prac3 FSWD 22bce157
header {
background-color: #ab36b1;
color: #fff;
text-align: center;
padding: 1em;
}
section {
padding: 2em;
display: flex;
}
.column {
flex: 1;
margin-bottom: 2em;
}
img {
width: 100%;
max-width: 600px;
height: auto;
display:block;
border-radius:25px;
h1 {
font-size: 4vw;
text-align: center;
}
h2 {
font-size: 3vw;
}
p {
font-size: 2vw;
line-height: 1.5;
}
p, h2 {
font-size: 3vw;
}
section {
flex-direction: column;
}
.column {
flex: 1;
}
}
p, h2 {
font-size: 1.5vw;
}
}
@media print{
h1 {
font-size: 6vw;
}
p, h2 {
font-size: 3vw;
}
section {
flex-direction: row;
}
.column {
flex: 1;
}
}
</style>
</head>
<body>
<header>
<h1>Responsive Web Page Example</h1>
</header>
<section>
<div class="column">
<!-- <img src="jellyfish.jpg" alt="Responsive Image"> -->
<picture>
<source srcset="jellfish2.jpg" media="(max-width:300px)">
<source srcset="jellyfish.jpg" media="(min-width:1200px)">
<img src="jellyfish2.jpg" alt="jellyfish" style="width:auto">
</picture>
</div>
<div class="column">
<h2>About Jellyfish</h2>
<p>
Jellyfish are fascinating creatures that inhabit all the
world's oceans. They are found from the surface to the deep sea and come in a
variety of shapes and sizes. Jellyfish have been around for millions of years
and play a crucial role in marine ecosystems.
</p>
</div>
<div class="column">
<h2>Jellyfish Species</h2>
<p>
There are thousands of species of jellyfish, each with unique
characteristics. Some are bioluminescent, while others have vibrant colors.
Despite their delicate appearance, jellyfish are efficient predators, using
their tentacles to capture prey.
</p>
</div>
</section>
</body>
</html>
WEB PAGE: in laptop screen