Bootstrap Examples: Welcome to our handpicked assortment of Bootstrap examples! Within this thoughtfully selected compilation, you’ll discover a diverse array of code snippets showcasing the flexibility and robustness of the Bootstrap framework.
Whether you’re just starting out with Bootstrap or you’re a seasoned developer in search of creative ideas, this collection caters to all levels of expertise. Covering everything from responsive designs and navigation menus to form elements and modal dialogs, these examples serve as invaluable resources for crafting polished and sophisticated websites effortlessly.
Bootstrap Examples Codes
Here are a few examples of Bootstrap code snippets for common UI elements:
1) Navbar:
<nav class=”navbar navbar-expand-lg navbar-light bg-light”>
<a class=”navbar-brand” href=”#”>Navbar</a>
<button class=”navbar-toggler” type=”button” data-toggle=”collapse” data-target=”#navbarSupportedContent” aria-controls=”navbarSupportedContent” aria-expanded=”false” aria-label=”Toggle navigation”>
<span class=”navbar-toggler-icon”></span>
</button>
<div class=”collapse navbar-collapse” id=”navbarSupportedContent”>
<ul class=”navbar-nav mr-auto”>
<li class=”nav-item active”>
<a class=”nav-link” href=”#”>Home <span class=”sr-only”>(current)</span></a>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>Link</a>
</li>
<li class=”nav-item”>
<a class=”nav-link disabled” href=”#”>Disabled</a>
</li>
</ul>
<form class=”form-inline my-2 my-lg-0″>
<input class=”form-control mr-sm-2″ type=”search” placeholder=”Search” aria-label=”Search”>
<button class=”btn btn-outline-success my-2 my-sm-0″ type=”submit”>Search</button>
</form>
</div>
</nav>
2) Buttons:
<button type=”button” class=”btn btn-primary”>Primary</button>
<button type=”button” class=”btn btn-secondary”>Secondary</button>
<button type=”button” class=”btn btn-success”>Success</button>
<button type=”button” class=”btn btn-danger”>Danger</button>
<button type=”button” class=”btn btn-warning”>Warning</button>
<button type=”button” class=”btn btn-info”>Info</button>
<button type=”button” class=”btn btn-light”>Light</button>
<button type=”button” class=”btn btn-dark”>Dark</button>
<button type=”button” class=”btn btn-link”>Link</button>
3) Alerts:
<div class=”alert alert-primary” role=”alert”>
This is a primary alert—check it out!
</div>
<div class=”alert alert-secondary” role=”alert”>
This is a secondary alert—check it out!
</div>
<div class=”alert alert-success” role=”alert”>
This is a success alert—check it out!
</div>
<div class=”alert alert-danger” role=”alert”>
This is a danger alert—check it out!
</div>
<div class=”alert alert-warning” role=”alert”>
This is a warning alert—check it out!
</div>
<div class=”alert alert-info” role=”alert”>
This is a info alert—check it out!
</div>
<div class=”alert alert-light” role=”alert”>
This is a light alert—check it out!
</div>
<div class=”alert alert-dark” role=”alert”>
This is a dark alert—check it out!
</div>
4) Product Showcase Carousel:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Product Showcase Carousel</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div id=”carouselExampleIndicators” class=”carousel slide” data-ride=”carousel”>
<ol class=”carousel-indicators”>
<li data-target=”#carouselExampleIndicators” data-slide-to=”0″ class=”active”></li>
<li data-target=”#carouselExampleIndicators” data-slide-to=”1″></li>
<li data-target=”#carouselExampleIndicators” data-slide-to=”2″></li>
</ol>
<div class=”carousel-inner”>
<div class=”carousel-item active”>
<img class=”d-block w-100″ src=”image1.jpg” alt=”First slide”>
</div>
<div class=”carousel-item”>
<img class=”d-block w-100″ src=”image2.jpg” alt=”Second slide”>
</div>
<div class=”carousel-item”>
<img class=”d-block w-100″ src=”image3.jpg” alt=”Third slide”>
</div>
</div>
<a class=”carousel-control-prev” href=”#carouselExampleIndicators” role=”button” data-slide=”prev”>
<span class=”carousel-control-prev-icon” aria-hidden=”true”></span>
<span class=”sr-only”>Previous</span>
</a>
<a class=”carousel-control-next” href=”#carouselExampleIndicators” role=”button” data-slide=”next”>
<span class=”carousel-control-next-icon” aria-hidden=”true”></span>
<span class=”sr-only”>Next</span>
</a>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
5) Navbar with Dropdown Menu:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Navbar with Dropdown Menu</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<nav class=”navbar navbar-expand-lg navbar-light bg-light”>
<a class=”navbar-brand” href=”#”>Navbar</a>
<button class=”navbar-toggler” type=”button” data-toggle=”collapse” data-target=”#navbarNavDropdown” aria-controls=”navbarNavDropdown” aria-expanded=”false” aria-label=”Toggle navigation”>
<span class=”navbar-toggler-icon”></span>
</button>
<div class=”collapse navbar-collapse” id=”navbarNavDropdown”>
<ul class=”navbar-nav ml-auto”>
<li class=”nav-item dropdown”>
<a class=”nav-link dropdown-toggle” href=”#” id=”navbarDropdownMenuLink” role=”button” data-toggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
Dropdown link
</a>
<div class=”dropdown-menu” aria-labelledby=”navbarDropdownMenuLink”>
<a class=”dropdown-item” href=”#”>Action</a>
<a class=”dropdown-item” href=”#”>Another action</a>
<a class=”dropdown-item” href=”#”>Something else here</a>
</div>
</li>
</ul>
</div>
</nav>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
6) Bootstrap Button Groups
Overview:
Bootstrap Button Groups allow you to group buttons together for better organization and layout control. They provide a convenient way to manage multiple related buttons as a single unit.
Example Code:
<div class=”btn-group” role=”group” aria-label=”Basic example”>
<button type=”button” class=”btn btn-primary”>Left</button>
<button type=”button” class=”btn btn-primary”>Middle</button>
<button type=”button” class=”btn btn-primary”>Right</button>
</div>
7) Bootstrap Wells
Overview:
Bootstrap Wells are used to create a container with rounded corners and a gray background to visually set it apart from other content. They are often used to highlight important information or sections of a webpage.
Example Code:
<div class=”well”>
<p>This is a basic well.</p>
</div>
8) Bootstrap Tables
Overview:
Bootstrap Tables provide a simple and flexible way to display tabular data on web pages. They offer various styling options and responsive behavior for easy viewing on different devices.
Example Code:
<table class=”table”>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John</td>
<td>Doe</td>
<td>@john</td>
</tr>
<tr>
<td>2</td>
<td>Jane</td>
<td>Smith</td>
<td>@jane</td>
</tr>
<tr>
<td>3</td>
<td>James</td>
<td>Johnson</td>
<td>@james</td>
</tr>
</tbody>
</table>
Also Read: Bootstrap Datatable – Examples & Tutorial
Bootstrap Examples Templates
Below are some Bootstrap examples templates:
1) Navbar Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Navbar Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<nav class=”navbar navbar-expand-lg navbar-light bg-light”>
<a class=”navbar-brand” href=”#”>Navbar</a>
<button class=”navbar-toggler” type=”button” data-toggle=”collapse” data-target=”#navbarNav” aria-controls=”navbarNav” aria-expanded=”false” aria-label=”Toggle navigation”>
<span class=”navbar-toggler-icon”></span>
</button>
<div class=”collapse navbar-collapse” id=”navbarNav”>
<ul class=”navbar-nav”>
<li class=”nav-item active”>
<a class=”nav-link” href=”#”>Home <span class=”sr-only”>(current)</span></a>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>Features</a>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>Pricing</a>
</li>
<li class=”nav-item”>
<a class=”nav-link disabled” href=”#” tabindex=”-1″ aria-disabled=”true”>Disabled</a>
</li>
</ul>
</div>
</nav>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
2) Card Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Card Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”card” style=”width: 18rem;”>
<img src=”https://via.placeholder.com/150″ class=”card-img-top” alt=”…”>
<div class=”card-body”>
<h5 class=”card-title”>Card title</h5>
<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>
<a href=”#” class=”btn btn-primary”>Go somewhere</a>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
3) Carousel Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Carousel Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div id=”carouselExampleSlidesOnly” class=”carousel slide” data-ride=”carousel”>
<div class=”carousel-inner”>
<div class=”carousel-item active”>
<img src=”https://via.placeholder.com/800×400″ class=”d-block w-100″ alt=”…”>
</div>
<div class=”carousel-item”>
<img src=”https://via.placeholder.com/800×400″ class=”d-block w-100″ alt=”…”>
</div>
<div class=”carousel-item”>
<img src=”https://via.placeholder.com/800×400″ class=”d-block w-100″ alt=”…”>
</div>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
4) Alert Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Alert Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”alert alert-success” role=”alert”>
This is a success alert—check it out!
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
5) Form Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Form Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<form>
<div class=”form-group”>
<label for=”exampleInputEmail1″>Email address</label>
<input type=”email” class=”form-control” id=”exampleInputEmail1″ aria-describedby=”emailHelp”>
<small id=”emailHelp” class=”form-text text-muted”>We’ll never share your email with anyone else.</small>
</div>
<div class=”form-group”>
<label for=”exampleInputPassword1″>Password</label>
<input type=”password” class=”form-control” id=”exampleInputPassword1″>
</div>
<div class=”form-check”>
<input type=”checkbox” class=”form-check-input” id=”exampleCheck1″>
<label class=”form-check-label” for=”exampleCheck1″>Check me out</label>
</div>
<button type=”submit” class=”btn btn-primary”>Submit</button>
</form>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
6) Jumbotron Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Bootstrap Jumbotron Example</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”jumbotron”>
<h1 class=”display-4″>Hello, world!</h1>
<p class=”lead”>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<hr class=”my-4″>
<p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
<a class=”btn btn-primary btn-lg” href=”#” role=”button”>Learn more</a>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
Also Read: Bootstrap Contact Form: 10 Best Bootstrap Contact Forms 2024
Bootstrap Examples Dashboard
1) Admin Dashboard Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Admin Dashboard</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”container-fluid”>
<div class=”row”>
<nav class=”col-md-2 d-none d-md-block bg-light sidebar”>
<div class=”sidebar-sticky”>
<ul class=”nav flex-column”>
<li class=”nav-item”>
<a class=”nav-link active” href=”#”>
Dashboard <span class=”sr-only”>(current)</span>
</a>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>
Orders
</a>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>
Customers
</a>
</li>
</ul>
</div>
</nav>
<main role=”main” class=”col-md-9 ml-sm-auto col-lg-10 px-md-4″>
<h1 class=”mt-5″>Dashboard</h1>
<div class=”table-responsive”>
<table class=”table table-striped”>
<thead>
<tr>
<th>#</th>
<th>Header</th>
<th>Header</th>
<th>Header</th>
<th>Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>1,001</td>
<td>Lorem</td>
<td>ipsum</td>
<td>dolor</td>
<td>sit</td>
</tr>
</tbody>
</table>
</div>
</main>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
2) Sales Dashboard Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Sales Dashboard</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”container”>
<div class=”row”>
<div class=”col-md-4″>
<div class=”card”>
<div class=”card-header”>Sales Overview</div>
<div class=”card-body”>Total Sales: $100,000</div>
</div>
</div>
<div class=”col-md-8″>
<div class=”card”>
<div class=”card-header”>Recent Orders</div>
<div class=”card-body”>
<ul class=”list-group”>
<li class=”list-group-item”>Order #1</li>
<li class=”list-group-item”>Order #2</li>
<li class=”list-group-item”>Order #3</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
3) Analytics Dashboard Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Analytics Dashboard</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”container-fluid”>
<div class=”row”>
<div class=”col-md-3″>
<div class=”card”>
<div class=”card-header”>Website Visitors</div>
<div class=”card-body”>1,000</div>
</div>
</div>
<div class=”col-md-3″>
<div class=”card”>
<div class=”card-header”>Page Views</div>
<div class=”card-body”>5,000</div>
</div>
</div>
<div class=”col-md-6″>
<div class=”card”>
<div class=”card-header”>Traffic Sources</div>
<div class=”card-body”>
<canvas id=”trafficChart” width=”400″ height=”200″></canvas>
</div>
</div>
</div>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/chart.js”></script>
<script>
var ctx = document.getElementById(‘trafficChart’).getContext(‘2d’);
var chart = new Chart(ctx, {
type: ‘line’,
data: {
labels: [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’],
datasets: [{
label: ‘Organic’,
data: [100, 200, 300, 400, 500, 600],
backgroundColor: ‘rgba(54, 162, 235, 0.2)’,
borderColor: ‘rgba(54, 162, 235, 1)’,
borderWidth: 1
}, {
label: ‘Referral’,
data: [50, 100, 150, 200, 250, 300],
backgroundColor: ‘rgba(255, 99, 132, 0.2)’,
borderColor: ‘rgba(255, 99, 132, 1)’,
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
</script>
</body>
</html>
4) Project Management Dashboard Template:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Project Management Dashboard</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
</head>
<body>
<div class=”container”>
<div class=”row”>
<div class=”col-md-6″>
<div class=”card”>
<div class=”card-header”>Projects</div>
<div class=”card-body”>
<ul class=”list-group”>
<li class=”list-group-item”>Project 1</li>
<li class=”list-group-item”>Project 2</li>
<li class=”list-group-item”>Project 3</li>
</ul>
</div>
</div>
</div>
<div class=”col-md-6″>
<div class=”card”>
<div class=”card-header”>Tasks</div>
<div class=”card-body”>
<ul class=”list-group”>
<li class=”list-group-item”>Task 1</li>
<li class=”list-group-item”>Task 2</li>
<li class=”list-group-item”>Task 3</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<script src=”https://code.jquery.com/jquery-3.5.1.slim.min.js”></script>
<script src=”https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js”></script>
<script src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js”></script>
</body>
</html>
Also Read: Bootstrap Cards: Media Objects and Examples
Bootstrap Typography
Bootstrap Typography allows you to easily style and format text on your website using predefined classes provided by the Bootstrap framework. With Bootstrap, you can apply various typographic styles such as headings, paragraphs, lists, and inline text elements with minimal effort. Here’s an overview of some key Bootstrap typography classes:
1) Headings:
Bootstrap provides classes for headings <h1> to <h6>, allowing you to apply consistent styles to different levels of headings. These classes are .h1 through .h6.
<h1 class=”h1″>Heading 1</h1>
<h2 class=”h2″>Heading 2</h2>
<h3 class=”h3″>Heading 3</h3>
<h4 class=”h4″>Heading 4</h4>
<h5 class=”h5″>Heading 5</h5>
<h6 class=”h6″>Heading 6</h6>
2) Paragraphs:
Use the .lead class to make paragraphs stand out and the .text-muted, .text-primary, etc., classes to apply different text colors.
<p class=”lead”>This is a lead paragraph.</p>
<p class=”text-muted”>This text is muted.</p>
<p class=”text-primary”>This text is primary.</p>
3) Text Alignment:
Bootstrap offers classes like .text-left, .text-center, .text-right, and .text-justify to align text as needed.
<p class=”text-left”>Left aligned text.</p>
<p class=”text-center”>Center aligned text.</p>
<p class=”text-right”>Right aligned text.</p>
<p class=”text-justify”>Justified text.</p>
4) Font Weight and Style:
You can use classes like .font-weight-bold for bold text and .font-italic for italic text.
<p class=”font-weight-bold”>Bold text.</p>
<p class=”font-italic”>Italic text.</p>
5) Lists:
Bootstrap provides classes for unordered lists (<ul>) and ordered lists (<ol>) to style list items and remove default list styles.
<ul class=”list-unstyled”>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
6) Inline Text Elements:
Apply styles to inline text elements such as <mark>, <small>, <strong>, <em>, <u>, and <del> using Bootstrap classes.
<p>This is <mark>highlighted</mark> text.</p>
<p><small>This is small text.</small></p>
<p><strong>This is strong text.</strong></p>
<p><em>This is emphasized text.</em></p>
<p><u>This is underlined text.</u></p>
<p><del>This is deleted text.</del></p>
For Latest Tech Related Information, Join Our Official Free Telegram Group : PW Skills Telegram Group
Bootstrap Examples FAQ's
What are Bootstrap examples?
Bootstrap examples are ready-to-use code snippets or templates built using the Bootstrap framework. These examples demonstrate the capabilities and features of Bootstrap and serve as starting points for creating web pages or applications.
Where can I find Bootstrap examples?
Bootstrap examples can be found on various websites, including the official Bootstrap documentation, code repositories like GitHub, and online platforms specializing in web development tutorials and resources.
How do I use Bootstrap examples in my project?
To use Bootstrap examples in your project, you can simply copy the code from the example and paste it into your HTML file. Ensure that you have included the necessary Bootstrap CSS and JavaScript files in your project to ensure proper styling and functionality.
Can Bootstrap examples be customized?
Yes, Bootstrap examples can be customized according to your project requirements. You can modify the HTML, CSS, and JavaScript code to tailor the example to your specific needs, such as changing colors, layouts, or adding additional components.
Are Bootstrap examples responsive?
Yes, Bootstrap examples are designed to be responsive by default. The Bootstrap framework utilizes responsive CSS classes and components to ensure that web pages or applications built using Bootstrap examples adapt to different screen sizes and devices.