Bootstrap
Bootstrap 5 Started
OutPut
Digital Learining Goal Bootstrap Page
Bootstrap Page
// Fixed Container : class="container" class="container-fluid"<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container”>
<h3>Digital Learining Goal Bootstrap Page</h3>
<h4>Bootstrap Page</h4>
</div>
</body>
</html>
Grid Classes
OutPut
Digital Learining Goal
Three equal width columns
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example2</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container-fluid mt-3″>
<h5>Digital Learining Goal</h5>
<h4>Three equal width columns</h4>
<div class=”row”>
<div class=”col p-3 bg-primary text-white”>الرقمي </div>
<div class=”col p-3 bg-dark text-white”>للتعليم</div>
<div class=”col p-3 bg-primary text-white”>الهدف</div>
</div>
</div>
</body>
</html>
Note: system has six classes
1-col-
(extra small devices – screen width less than 576px)
2-col-sm-
(small devices – screen width equal to or greater than 576px)
3-col-md-
(medium devices – screen width equal to or greater than 768px)
4- col-lg-
(large devices – screen width equal to or greater than 992px)
5- col-xl-
(xlarge devices – screen width equal to or greater than 1200px)
6-col-xxl-
(xxlarge devices – screen width equal to or greater than 1400px)
Colors
OutPut
text Colors
Digital Learining Goal.
Digital Learining Goal.
Digital Learining Goal.
Digital Learining Goal.
Digital Learining Goal.
Backgrounds Colors:
Digital Learining Goal.
Digital Learining Goal.
Digital Learining Goal.
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 3</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>text Colors</h2>
<p class=”text-danger”>Digital Learining Goal.</p>
<p class=”text-warning”>Digital Learining Goal.</p>
<p class=”text-primary”>Digital Learining Goal.</p>
<p class=”text-info”>Digital Learining Goal.</p>
<p class=”text-success”>Digital Learining Goal.</p>
<h5> Backgrounds Colors:</h5>
<p class=”bg-success text-white”>Digital Learining Goal.</p>
<p class=”bg-info text-white”>Digital Learining Goal.</p>
<p class=”bg-danger text-white”>Digital Learining Goal.</p>
</p>
</p>
</div>
</body>
</html>
Tables
OutPut
Digital Learining Goal
Data table:
ID | Firstname | Lastname |
---|---|---|
15645 | Samah | more |
15646 | Yusuf | July |
15647 | Ibrahim | Adam |
Note : Table design can be used
table-primary / table-success / table-danger / table-info /table-warning / table-active / table-secondary / table-light / table-dark
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 4</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Digital Learining Goal</h2>
<p>Data table:</p>
<table class=”table table-striped”>
<thead>
<tr>
<th>ID</th>
<th>Firstname</th>
<th>Lastname</th>
</tr>
</thead>
<tbody>
<tr>
<td>15645</td>
<td>Samah</td>
<td>more</td>
</tr>
<tr>
<td>15646</td>
<td>Yusuf</td>
<td>July</td>
</tr>
<tr>
<td>15647</td>
<td>Ibrahim</td>
<td>Adam</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Images
OutPut
Image

<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 5</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h5>Image</h5>
<p></p>
<img class=”img-fluid” src=”https://en.dlg-learning.com/wp-content/uploads/2022/06/86939-scaled.jpg” alt=”New York” width=”300″ height=”100″>
</div>
</body>
</html>
Alerts
OutPut
Alert Links
"matching colored links".
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Example 6</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Alert Links</h2>
<p> “matching colored links”.</p>
<div class=”alert alert-success”>
<strong>Success!</strong> You should <a href=”#” class=”alert-link”>read this message</a>.
</div>
<div class=”alert alert-info”>
<strong>Info!</strong> You should <a href=”#” class=”alert-link”>read this message</a>.
</div>
<div class=”alert alert-danger”>
<strong>Danger!</strong> You should <a href=”#” class=”alert-link”>read this message</a>.
</div>
</div>
</body>
</html>
Buttons
OutPut
Button DLG
Note :Button Sizes /Use the btn-lg
/ btn-sm
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 7 </title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Button DLG</h2>
<button type=”button” class=”btn btn-outline-primary”>Home</button>
<button type=”button” class=”btn btn-outline-success”>About Us</button>
<button type=”button” class=”btn btn-outline-warning”>Our Business</button>
<button type=”button” class=”btn btn-outline-danger”>Learining</button>
</div>
</body>
</html>
Button Groups
OutPut
DLG Button Group
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 8</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>DLG Button Group</h2>
<div class=”btn-group”>
<button type=”button” class=”btn btn-primary”>Learning</button>
<button type=”button” class=”btn btn-primary”>Css</button>
<button type=”button” class=”btn btn-primary”>Bootstrap</button>
</div>
</div>
</body>
</html>
Badges
OutPut
Badge inside a Button
Badges are used to add additional information to any content:
<!DOCTYPE html>
<html lang=”en”>
<head>
<title> Example 9</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Badge inside a Button</h2>
<h6>Badges are used to add additional information to any content:</h6>
<button type=”button” class=”btn btn-warning”>
Learning <span class=”badge bg-success”>3</span>
</button>
<button type=”button” class=”btn btn-success”>
page <span class=”badge bg-warning”>14</span>
</button>
</div>
</body>
</html>
Progress Bar
OutPut
The .progress-bar-striped class adds stripes to the progress bars:
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<p>The .progress-bar-striped class adds stripes to the progress bars:</p>
<div class=”progress”>
<div class=”progress-bar progress-bar-striped” style=”width:30%”></div>
</div>
<br>
<div class=”progress”>
<div class=”progress-bar bg-success progress-bar-striped” style=”width:40%”></div>
</div>
<br>
<div class=”progress”>
<div class=”progress-bar bg-info progress-bar-striped” style=”width:50%”></div>
</div>
<br>
<div class=”progress”>
<div class=”progress-bar bg-warning progress-bar-striped” style=”width:60%”></div>
</div>
<br>
<div class=”progress”>
<div class=”progress-bar bg-danger progress-bar-striped” style=”width:70%”></div>
</div>
</div>
</body>
</html>
Spinners
OutPut
Spinner Buttons
Add spinners to buttons:
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Spinner Buttons</h2>
<p>Add spinners to buttons:</p>
<button class=”btn btn-primary”>
<span class=”spinner-border spinner-border-sm”></span>
</button>
<button class=”btn btn-primary”>
<span class=”spinner-border spinner-border-sm”></span>
Loading..
</button>
<button class=”btn btn-primary” disabled>
<span class=”spinner-border spinner-border-sm”></span>
Loading..
</button>
<button class=”btn btn-primary” disabled>
<span class=”spinner-grow spinner-grow-sm”></span>
Loading..
</button>
</div>
</body>
</html>
Pagination
OutPut
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Pagination – Digital Learning Goal</h2>
<p>Add class .disabled if a page for some reason is disabled:</p>
<ul class=”pagination”>
<li class=”page-item disabled”><a class=”page-link” href=”#”>Previous</a></li>
<li class=”page-item”><a class=”page-link” href=”#”>1</a></li>
<li class=”page-item”><a class=”page-link” href=”#”>2</a></li>
<li class=”page-item”><a class=”page-link” href=”#”>3</a></li>
<li class=”page-item”><a class=”page-link” href=”#”>Next</a></li>
</ul>
</div>
</body>
</html>
Dropdown
OutPut
Digital Learning Goal
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Digital Learning Goal</h2>
<div class=”btn-group-vertical”>
<button type=”button” class=”btn btn-primary”>Home</button>
<button type=”button” class=”btn btn-primary”>About us</button>
<div class=”btn-group”>
<button type=”button” class=”btn btn-primary dropdown-toggle” data-bs-toggle=”dropdown”>Our business</button>
<ul class=”dropdown-menu”>
<li><a class=”dropdown-item” href=”#”>Introduction/a></li>
<li><a class=”dropdown-item” href=”#”>Training</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
Collapsible
OutPut
Click on the button to toggle between showing and hiding content.
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<p>Click on the button to toggle between showing and hiding content.</p>
<button type=”button” class=”btn btn-primary” data-bs-toggle=”collapse” data-bs-target=”#coll”>Simple collapsible</button>
<div id=”coll” class=”collapse”>
Digital Learning Goal
</div>
</div>
</body>
</html>
Navs
OutPut
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<ul class=”nav nav-pills”>
<li class=”nav-item”>
<a class=”nav-link active” href=”#”>Home</a>
</li>
<li class=”nav-item dropdown”>
<a class=”nav-link dropdown-toggle” data-bs-toggle=”dropdown” href=”#”>Learning</a>
<ul class=”dropdown-menu”>
<li><a class=”dropdown-item” href=”#”>Java</a></li>
<li><a class=”dropdown-item” href=”#”>Css</a></li>
<li><a class=”dropdown-item” href=”#”>PHP</a></li>
</ul>
</li>
<li class=”nav-item”>
<a class=”nav-link” href=”#”>Contact us</a>
</li>
<li class=”nav-item”>
<a class=”nav-link disabled” href=”#”>English</a>
</li>
</ul>
</div>
</body>
</html>
Modal
OutPut
Click on the button to open the modal.
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<p>Click on the button to open the modal.</p>
<button type=”button” class=”btn btn-primary” data-bs-toggle=”modal” data-bs-target=”#myModal”>
Open modal
</button>
</div>
<!– The Modal –>
<div class=”modal” id=”myModal”>
<div class=”modal-dialog”>
<div class=”modal-content”>
<!– Modal Header –>
<div class=”modal-header”>
<h4 class=”modal-title”>Modal Heading</h4>
<button type=”button” class=”btn-close” data-bs-dismiss=”modal”></button>
</div>
<!– Modal body –>
<div class=”modal-body”>
Modal body..
</div>
<!– Modal footer –>
<div class=”modal-footer”>
<button type=”button” class=”btn btn-danger” data-bs-dismiss=”modal”>Close</button>
</div>
</div>
</div>
</div>
</body>
</html>
Tooltip
OutPut
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h3>Tooltip Positioning</h3>
<p>The data-bs-placement attribute specifies the tooltip position.</p>
<a href=”#” data-bs-toggle=”tooltip” data-bs-placement=”top” title=”Hooray!”>Top</a>
<a href=”#” data-bs-toggle=”tooltip” data-bs-placement=”bottom” title=”Hooray!”>Bottom</a>
<a href=”#” data-bs-toggle=”tooltip” data-bs-placement=”left” title=”Hooray!”>Left</a>
<a href=”#” data-bs-toggle=”tooltip” data-bs-placement=”right” title=”Hooray!”>Right</a>
</div>
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll(‘[data-bs-toggle=”tooltip”]’))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
</body>
</html>
Toasts
OutPut
In this example, we use a button to show the toast message.
Digital Learning Goal
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<p>In this example, we use a button to show the toast message.</p>
<button type=”button” class=”btn btn-primary” id=”toastbtn”>Show Toast</button>
<div class=”toast”>
<div class=”toast-header”>
<strong class=”me-auto”>Toast Header</strong>
<button type=”button” class=”btn-close” data-bs-dismiss=”toast”></button>
</div>
<div class=”toast-body”>
<p>Digital Learning Goal</p>
</div>
</div>
</div>
<script>
document.getElementById(“toastbtn”).onclick = function() {
var toastElList = [].slice.call(document.querySelectorAll(‘.toast’))
var toastList = toastElList.map(function(toastEl) {
return new bootstrap.Toast(toastEl)
})
toastList.forEach(toast => toast.show())
}
</script>
</body>
</html>
Offcanvas
OutPut
Heading
Digital Learning Goal
Digital Learning Goal
Digital Learning Goal
Offcanvas is similar to modals, except that it is often used as a sidebar.
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”offcanvas offcanvas-start” id=”demo”>
<div class=”offcanvas-header”>
<h1 class=”offcanvas-title”>Heading</h1>
<button type=”button” class=”btn-close” data-bs-dismiss=”offcanvas”></button>
</div>
<div class=”offcanvas-body”>
<p>Digital Learning Goal</p>
<p>Digital Learning Goal</p>
<p>Digital Learning Goal</p>
<button class=”btn btn-secondary” type=”button”>A Button</button>
</div>
</div>
<div class=”container-fluid mt-3″>
<p>Offcanvas is similar to modals, except that it is often used as a sidebar.</p>
<button class=”btn btn-primary” type=”button” data-bs-toggle=”offcanvas” data-bs-target=”#demo”>
Open Offcanvas Sidebar
</button>
</div>
</body>
</html>
Utilities
OutPut
Height Utilities
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h1>Height Utilities</h1>
<div style=”height:200px;background-color:#ddd”>
<div class=”h-25 d-inline-block p-2 bg-warning”>25%</div>
<div class=”h-50 d-inline-block p-2 bg-warning”>50%</div>
<div class=”h-75 d-inline-block p-2 bg-warning”>75%</div>
<div class=”h-100 d-inline-block p-2 bg-warning”>100%</div>
<div class=”h-auto d-inline-block p-2 bg-warning”>Auto Height</div>
<div class=”mh-100 d-inline-block p-2 bg-warning” style=”height:500px”>100%</div>
</div>
</div>
</body>
</html>
Flex
OutPut
Use .flex-column to display the flex items vertically (on top of each other):
Use .flex-column-reverse to reverse the vertical direction:
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<p>Use .flex-column to display the flex items vertically (on top of each other):</p>
<div class=”d-flex flex-column mb-3″>
<div class=”p-2 bg-info”>Digital Learning Goal 1</div>
<div class=”p-2 bg-warning”>Digital Learning Goal 2</div>
<div class=”p-2 bg-primary”>Digital Learning Goal 3</div>
</div>
<p>Use .flex-column-reverse to reverse the vertical direction:</p>
<div class=”d-flex flex-column-reverse”>
<div class=”p-2 bg-info”>DLG 1</div>
<div class=”p-2 bg-warning”>DLG 2</div>
<div class=”p-2 bg-primary”>DLG 3</div>
</div>
</div>
</body>
</html>
Forms
OutPut
Inline Forms
If you want your form elements to appear side by side, use .row and .col:
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Inline Forms</h2>
<p>If you want your form elements to appear side by side, use .row and .col:</p>
<form>
<div class=”row”>
<div class=”col”>
<input type=”text” class=”form-control” placeholder=”Enter email” name=”email”>
</div>
<div class=”col”>
<input type=”password” class=”form-control” placeholder=”Enter password” name=”pswd”>
</div>
</div>
</form>
</div>
</body>
</html>
Select Menu
OutPut
Select Menu Size
Use the .form-select-lg or .form-select-sm class to change the size of the select menu:
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Select Menu Size</h2>
<p>Use the .form-select-lg or .form-select-sm class to change the size of the select menu:</p>
<form>
<select class=”form-select form-select-lg”>
<option>DLG 1</option>
<option>DLG 2</option>
<option>DLG 3</option>
<option>DLG 4</option>
</select>
<select class=”form-select mt-3″>
<option>DLG 1</option>
<option>DLG 2</option>
<option>DLG 3</option>
<option>DLG 4</option>
</select>
<select class=”form-select form-select-sm mt-3″>
<option>DLG 1</option>
<option>DLG 2</option>
<option>DLG 3</option>
<option>DLG 4</option>
</select>
</form>
</div>
</body>
</html>
Checkboxes
OutPut
Checkboxes
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css” rel=”stylesheet”>
<script src=”https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js”></script>
</head>
<body>
<div class=”container mt-3″>
<h2>Checkboxes</h2>
<form action=”/action_page.php”>
<div class=”form-check”>
<input type=”checkbox” class=”form-check-input” id=”check1″ name=”option1″ value=”something” checked>
<label class=”form-check-label” for=”check1″>Css</label>
</div>
<div class=”form-check”>
<input type=”checkbox” class=”form-check-input” id=”check2″ name=”option2″ value=”something”>
<label class=”form-check-label” for=”check2″>JavaScript</label>
</div>
<div class=”form-check”>
<input type=”checkbox” class=”form-check-input” disabled>
<label class=”form-check-label”>PHP</label>
</div>
<button type=”submit” class=”btn btn-primary mt-3″>Chosse</button>
</form>
</div>
</body>
</html>