Practical 7 (IWT)
Practical 7 (IWT)
A responsive website is designed to provide an optimal viewing and interaction experience across a
wide range of devices (desktops, tablets, and mobile phones). It adjusts its layout dynamically based on
the size and resolution of the screen.
Bootstrap is one of the most popular frameworks for building responsive websites. It provides pre-
designed CSS classes and JavaScript components to create layouts and UI elements that work
seamlessly across different screen sizes. Bootstrap simplifies the process of creating a responsive
website by offering a grid system, prebuilt components, and utility classes.
7.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Website</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet">
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css"
rel="stylesheet">
</head>
<body>
<div class="container">
<span class="navbar-toggler-icon"></span>
</button>
</ul>
</div>
</div>
</nav>
</div>
<h3>Mobile Friendly</h3>
</div>
<h3>Fast Performance</h3>
</div>
<h3>Secure</h3>
</div>
</div>
</div>
<div class="container">
</p>
</div>
</footer>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js">
</script>
</body>
</html>
OUTPUT
1. ON DESKTOP
2. ON MOBILE
CODE EXPLANATION
1. Responsive Navbar:
o Includes a collapsible menu for smaller screens using navbar-toggler.
2. Hero Section:
o Uses a full-width background with a heading, paragraph, and button.
3. Icons:
o Included Bootstrap Icons for visual enhancements:
<i class="bi bi-icon-name"></i> is used for icons like bi-star-fill, bi-phone, etc.
OUTPUT
1. On Desktop: Navbar is fully expanded, features are aligned horizontally, and content is spread.
2. On Mobile: Navbar collapses into a toggle button, features stack vertically.