Tsallaka zuwa abun ciki
Justice Tech School

Bootstrap Tutorial

Build responsive websites fast with the Bootstrap framework.

Start learning Bootstrap
Getting started7 lessons
  1. 1Bootstrap IntroductionBootstrap is the most popular CSS framework for building responsive, mobile first websites.
  2. 2Bootstrap Get StartedAdd the CDN link and the viewport meta tag.
  3. 3The Viewport Meta TagBootstrap is mobile first.
  4. 4ContainersA container centres and pads your content.
  5. 5BreakpointsBreakpoints are screen widths where the layout changes: xs below 576px, sm 576, md 768, lg.
  6. 6Theme ColorsBootstrap names colours by meaning: primary, secondary, success, danger, warning, info, li.
  7. 7Dark Mode and Color ModesBootstrap 5.3 supports light and dark with the data-bs-theme attribute.
Layout8 lessons
  1. 8Grid System BasicsThe grid has 12 columns.
  2. 9Column SizesUse .col-6, .col-4 and so on to set widths out of 12.
  3. 10Auto Layout ColumnsWithout numbers, columns share space.
  4. 11Gutters and Spacing in RowsGutters are the gaps between columns.
  5. 12Aligning ColumnsUse align-items-* on a row for vertical alignment and justify-content-* for horizontal.
  6. 13Offset and Order.offset-md-3 pushes a column right.
  7. 14Nested Grids and Row ColumnsPut a new .row inside a column to nest the grid.
  8. 15Bootstrap CSS GridAn optional CSS grid layout lets you use real two dimensional layouts with .grid and .g-co.
Content7 lessons
  1. 16TypographyHeadings h1 to h6 and the .h1 to .h6 classes share styles.
  2. 17Text UtilitiesAlign with text-start, text-center and text-end.
  3. 18Images.img-fluid makes an image scale with its parent.
  4. 19TablesAdd .table to a table.
  5. 20Colors and BackgroundsUse text-* for text color, bg-* for background and text-bg-* for matched pairs.
  6. 21Borders, Rounding and ShadowsUse border, border-top, rounded, rounded-pill and shadow, shadow-sm or shadow-lg to style .
  7. 22IconsBootstrap Icons is a separate free set of SVG icons.
Components14 lessons
  1. 23ButtonsAdd .btn plus a variant such as .btn-primary.
  2. 24Button GroupsWrap related buttons in .btn-group for a joined look, or .btn-group-vertical for a vertica.
  3. 25AlertsAlerts show feedback messages.
  4. 26Badges and SpinnersBadges are small labels or counters.
  5. 27CardsA card is a flexible content box.
  6. 28NavbarA navbar needs .navbar and .navbar-expand-lg to collapse on small screens.
  7. 29Nav, Tabs and Pills.nav makes navigation.
  8. 30DropdownsA dropdown toggles a menu.
  9. 31ModalsA modal is a dialog over the page.
  10. 32Accordion and CollapseCollapse hides content.
  11. 33List Groups.list-group styles lists as a card like stack.
  12. 34Pagination and BreadcrumbsPagination splits long lists across pages.
  13. 35Progress Bars.progress is the track and .progress-bar the fill.
  14. 36Tooltips and PopoversTooltips and popovers use Popper and must be turned on with JavaScript because they are op.
Forms6 lessons
  1. 37Form ControlsUse .form-label, .form-control and .form-text.
  2. 38Select, Checks and SwitchesUse .form-select for dropdowns, .form-check with .form-check-input for checkboxes and radi.
  3. 39Input GroupsInput groups attach text, buttons or icons to an input using .input-group and .input-group.
  4. 40Form LayoutsPlace fields in the grid for horizontal or multi column forms.
  5. 41Floating LabelsWrap an input and label in .form-floating and the label floats above the text when the fie.
  6. 42Form ValidationAdd novalidate and the .was-validated class after a failed submit to show browser validati.
Utilities5 lessons
  1. 43Spacing: Margin and PaddingClasses follow the pattern property side size.
  2. 44Display Utilitiesd-none hides, d-block, d-inline and d-flex change display.
  3. 45Flex UtilitiesBootstrap wraps flexbox in classes: flex-row, flex-column, justify-content-*, align-items-.
  4. 46Sizing and Positionw-25, w-50, w-100 and h-100 set percentages.
  5. 47Visibility, Overflow and Ratioinvisible keeps space, visible shows.
Advanced BootstrapPremium9 lessons
  1. 48Customizing with SassInstall the source, override Sass variables before importing Bootstrap and compile.
  2. 49CSS VariablesBootstrap 5 exposes CSS variables such as --bs-primary and --bs-body-font-size.
  3. 50The Utility APIThe utility API in Sass generates classes from a map.
  4. 51OffcanvasAn offcanvas panel slides in from the edge of the screen for menus or carts.
  5. 52CarouselA carousel slides through images or content.
  6. 53Scrollspy and ToastsScrollspy highlights nav links as you scroll.
  7. 54Using the JavaScript APIEvery plugin has a JavaScript class: Modal, Collapse, Tooltip and more.
  8. 55AccessibilityUse semantic HTML, alt text, labels, focus styles, enough colour contrast and ARIA attribu.
  9. 56RTL SupportBootstrap has an RTL build for languages such as Arabic and Hebrew.
Bootstrap in practicePremium8 lessons
  1. 57Building a Landing PageCombine navbar, hero section, feature cards and a footer.
  2. 58Dashboard LayoutUse a sidebar column with a main area, cards for stats and responsive tables.
  3. 59Responsive Images and MediaCombine img-fluid with the picture element and loading="lazy".
  4. 60Bootstrap Compared With Other OptionsBootstrap gives ready made components and a consistent look quickly.
  5. 61Performance and Bundle SizeImport only the Sass or JavaScript you need, purge unused CSS, host files yourself or use .
  6. 62Bootstrap with React, Vue and AngularUse component libraries such as React Bootstrap, BootstrapVue Next or ng-bootstrap.
  7. 63Bootstrap Best PracticesUse the grid and utilities first, customise with variables, keep custom CSS small, write s.
  8. 64Next StepsYou can now build responsive layouts with the grid, components, forms and utilities.
Bootstrap layout12 lessons
  1. 65Containerscontainer is fixed width per breakpoint and container-fluid is full width.
  2. 66Grid SystemRows hold 12 column units.
  3. 67Responsive BreakpointsPrefixes sm, md, lg, xl and xxl apply from a width up.
  4. 68Auto Layout Columnscol without a number shares space equally.
  5. 69Guttersg-* classes set spacing between columns.
  6. 70Offsets and Orderoffset moves columns and order reorders them.
  7. 71Nesting GridsPut a row inside a column for deeper layouts.
  8. 72Alignment in Gridalign-items and justify-content position columns.
  9. 73Display Utilitiesd-* controls display per breakpoint.
  10. 74Flex Utilitiesd-flex plus utilities build flexible rows.
  11. 75Spacing Utilitiesm and p classes with sides and sizes 0 to 5.
  12. 76Sizing Utilitiesw-25, w-50, w-100, h-100 and mw-100 size elements.
Typography and color7 lessons
  1. 77Headings and Displayh1 to h6 and display-1 to display-6 are large headings.
  2. 78Text UtilitiesAlign, wrap, weight and transform text.
  3. 79Color Utilitiestext-* and bg-* use theme colors.
  4. 80Borders and Radiusborder and rounded classes shape boxes.
  5. 81Shadowsshadow-sm, shadow and shadow-lg add depth.
  6. 82Link and Opacity UtilitiesControl link underline and opacity.
  7. 83Position Utilitiesposition-relative, absolute and fixed-top place elements.
Bootstrap components17 lessons
  1. 84Buttonsbtn plus a color class styles buttons.
  2. 85Button Groupsbtn-group joins buttons.
  3. 86Alertsalert plus a color shows messages.
  4. 87Badgesbadge shows counts and labels.
  5. 88Cardscard, card-body, card-title and card-text build content boxes.
  6. 89List Groupslist-group styles lists.
  7. 90Nav and Tabsnav, nav-tabs and nav-pills build navigation.
  8. 91Navbarnavbar, navbar-expand-lg and navbar-toggler make responsive menus.
  9. 92Breadcrumbbreadcrumb shows page location.
  10. 93Paginationpagination, page-item and page-link build page lists.
  11. 94Tablestable plus modifiers style tables.
  12. 95Formsform-control and form-label style inputs.
  13. 96Checks, Radios and Switchesform-check wraps checkboxes and form-switch makes toggles.
  14. 97Select and Rangeform-select and form-range style these controls.
  15. 98Input Groupsinput-group adds text or buttons beside an input.
  16. 99Form Validation Stylesis-valid, is-invalid and needs-validation show states.
  17. 100Floating Labelsform-floating puts the label inside the input.
Interactive components11 lessons
  1. 101Including Bootstrap JSLoad the bundle to power components.
  2. 102Dropdownsdropdown-toggle and dropdown-menu build menus.
  3. 103Collapsecollapse hides content that a button toggles.
  4. 104Accordionaccordion builds collapsible sections.
  5. 105Modalsmodal shows a dialog.
  6. 106Tooltips and PopoversThese need JavaScript to be initialised.
  7. 107Carouselcarousel slides cycle images.
  8. 108Offcanvasoffcanvas slides a panel from an edge.
  9. 109Toaststoast shows small notices.
  10. 110Spinners and Progressspinner-border and progress show loading and completion.
  11. 111Placeholdersplaceholder-glow shows loading skeletons.
Bootstrap in real pages12 lessons
  1. 112Project: Hero SectionCombine container, display and buttons.
  2. 113Project: Pricing CardsThree cards in a responsive row.
  3. 114Project: Login FormCenter a form with grid and utilities.
  4. 115Project: Dashboard LayoutSidebar and main area with grid.
  5. 116Dark Modedata-bs-theme switches color modes.
  6. 117Bootstrap IconsBootstrap Icons is a separate icon font.
  7. 118Customising with CSS VariablesOverride CSS variables to restyle components.
  8. 119Customising with SassOverride Sass variables before importing Bootstrap.
  9. 120Accessibility TipsUse semantic tags, labels and visually-hidden text.
  10. 121Responsive Images and Ratiosimg-fluid scales images and ratio keeps aspect.
  11. 122Sticky FooterUse flex column and mt-auto.
  12. 123Bootstrap Best PracticesPrefer utilities, keep markup semantic and avoid overriding too much.