Professional Documents
Culture Documents
Date: 16/01/24
Roll No. and Name: 22BCE305 ROSHNI PANKAJKUMAR RANA
Course Code and Name: 2CS201 FULL STACK WEB DEVELOPMENT
Practical 3
1. Create a responsive web page involves using the viewport meta tag in the head
of your HTML document.
p3_webpage1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0">
<title>Web-page 1</title>
<style>
body{
background-color: lightblue;
h1{
background-color: white;
color: darkblue;
}
</style>
</head>
<body>
</body>
</html>
Output
p3_webpage1.html
2. Create a responsive web page by using the width and max-width Properties and
Changing images according to the browser width.
p3_webpage2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
header, footer {
background-color: #000000;
color: white;
text-align: center;
padding: 5px;
}
main {
padding: 20px;
.responsive-image {
width: 90%;
height: auto;
</style>
</head>
<body>
<header>
</header>
<main>
<img src="C:\Users\HP\Desktop\uni\fourth
sem\fswd\lab\fswd-1.png" alt="Front end"
class="responsive-image">
<img src="C:\Users\HP\Desktop\uni\fourth
sem\fswd\lab\fswd-2.png" alt="Back end"
class="responsive-image">
<h4><a
href="https://www.geeksforgeeks.org/what-is-full-stack-develop
ment/">Click on the link below to know more about full stack
web development!</a></h4>
</main>
<footer>
</footer>
</body>
</html>
Output:
p3_webpage2.html
3. Create a responsive web page that demonstrates responsive text size using
the "vw" (viewport width) unit in CSS
<!DOCTYPE html>
<html>
<style>
body{
background-color: lightpink;
h1{
background-color: white;
h6{
</style>
<body>
</body>
</html>
Output
p3_webpage3.html
4. Create a responsive web page that demonstrates media queries for creating
breakpoints in the web page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
header {
background-color: #333;
color: white;
padding: 10px;
main {
padding: 20px;
.responsive-image {
width: 100%;
height: auto;
margin-bottom: 20px;
}
main {
padding: 40px;
.responsive-image {
max-width: 400px;
main {
padding: 40px;
.responsive-image {
max-width: 600px;
}
@media screen and (min-width: 900px) {
main {
padding: 60px;
.responsive-image {
max-width: 900px;
footer {
background-color: #333;
color: white;
padding: 10px;
</style>
</head>
<body>
<header>
<h1>Full Stack Web Development</h1>
</header>
<main>
<img src="C:\Users\HP\Desktop\uni\fourth
sem\fswd\lab\fswd-1.png" alt="Image 1" class="responsive-image">
<img src="C:\Users\HP\Desktop\uni\fourth
sem\fswd\lab\fswd-2.png" alt="Image 2" class="responsive-image">
<p><a
href="https://www.geeksforgeeks.org/what-is-full-stack-developme
nt/">Click on the link below to know more about full stack web
development!</a></p>
</main>
<footer>
</body>
</html>
Output:
p3_webpage4.html