Last Updated : 23 Jul, 2025
Bootstrap is a popular front-end framework for building responsive and mobile-first websites. It provides pre-designed CSS, JavaScript components, and utility classes to quickly create modern and consistent user interfaces.
To start with Bootstrap, you need to install it on your project or use the CDN link. Follow these articles to install, depending on your system:
Let us now take a look at our first code example.
HTML
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</head>
<body>
<div class="container text-center">
<h1 class="text-success">
Welcome to GeeksforGeeks
</h1>
<p class="text-dark">A Simple Example of Bootstrap</p>
</div>
</body>
</html>
Output
FIrst Bootstrap ExampleIn this example:
Bootstrap layout is built on a flexible grid layout that adjusts seamlessly to different screen sizes. It uses a 12-column grid system to create responsive designs. You can control the width and positioning of columns by combining classes for different screen sizes (e.g., .col-md-6 for medium devices).
Bootstrap ContentBootstrap provides a range of classes to enhance and structure content. It includes typography classes for headings, paragraphs, and text alignment, as well as helper classes for spacing and text colors.
Bootstrap FormsBootstrap simplifies form creation with pre-styled components and layouts. It includes classes for form controls like text inputs, select menus, and checkboxes.
Bootstrap offers a rich set of pre-designed components to streamline UI development. These include buttons, cards, modals, navbars, and more.
Bootstrap helpers are utility classes that simplify common tasks and improve readability. They include classes for text alignment, visibility, display properties, and more.
Bootstrap UtilitiesBootstrap utilities are small, reusable classes that provide additional functionality and control. They include classes for spacing, alignment, borders, and background colors.
You can complete this Bootstrap tutorial in approximately 8 weeks.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4