Setup and the grid
Load Bootstrap from a CDN and place content with containers, rows and columns.
What you will be able to do
- Wrap content in .container or .container-fluid.
- Use .row for the flex context and .col-* for widths.
- Add breakpoint suffixes such as col-md-6.
- Never put content directly inside a row without a column.
In plain English
The grid is twelve columns wide. A row creates a flex container and columns divide the space. Breakpoint suffixes let the same markup change shape at sm, md, lg, xl and xxl.
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<div class="container py-4">
<div class="row g-3">
<div class="col-12 col-md-8">Main</div>
<div class="col-12 col-md-4">Sidebar</div>
</div>
</div>Your turn
EasyMake a three-column row
Build a row with three equal columns on md and up, stacking on small screens.
HTML · starter
<div class="row">Check your understanding before moving on.
Knowledge checkQuestion 1
How many columns does the Bootstrap grid use?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.