Program 7
Program 7
0
framework classes for Images, Cards and Gutters.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bootstrap 5 Demo</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<section>
<h2>Images</h2>
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<p>Thumbnail image</p>
</div>
<div class="col-md-4">
<img src="D:/Wallpapers/nature.jpg" class="img-fluid rounded-circle" alt="Circular image">
<p>Circular image</p>
</div>
</div>
</section>
<section class="mt-5">
<h2>Cards</h2>
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of
the card's content.</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of
the card's content.</p>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of
the card's content.</p>
</div>
</div>
</div>
</div>
</section>
<section class="mt-5">
<h2>Gutters</h2>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
</div>
</section>
</div>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0/js/bootstrap.bundle.min.js"></
script>
</body>
</html>
Explanation
Body Section
Images Section
The same structure is repeated for two other images with different classes (img-thumbnail,
img-fluid rounded-circle).
Cards Section
Gutters Section
<div class="row gx-2">: A Bootstrap row with horizontal gutters (spacing between
columns).
o The same column structure is repeated with different padding.
Script Section
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0/js/bootstrap.bun
dle.min.js"></script>: Links to the Bootstrap 5.0 JavaScript bundle, which includes
Popper.js for tooltips and popovers.
Summary
This HTML document uses Bootstrap 5.0 to create a responsive webpage with sections for
images, cards, and gutters. Each section demonstrates different Bootstrap classes and
components to style and layout the content effectively.
In Bootstrap 5, gutters are the spaces between columns. They can be controlled to create
different layouts and spacing patterns. Bootstrap 5 provides utility classes for both horizontal (x-
axis) and vertical (y-axis) gutters, allowing you to customize the spacing between columns as
needed.
Types of Gutters
Horizontal Gutters
Vertical Gutters
Combined Gutters