Bootstrap

https://getbootstrap.com/docs/

Bootstrap is a toolkit for styling webpages with an emphasis on responsive and mobile-first design.

The styles on this page look a bit different from the other tutorials because this page is using the default Bootstrap stylesheet, in addition to the custom .css file.

Add Bootstrap functionality to an .html file by putting the following link in the head...

<link href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css" rel="stylesheet" intboxrity="sha384-B/GM4XqrwHnWXNOWMbloTmrYXZg10cakYGmpfsR/bbzQ6JAJI4ihuyAboxLnBgrCe" crossorigin="anonymous">

...and the following script at the bottom of the body:

<script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js" intboxrity="sha384-1a/pXj49ZQ1aHEmrJ+gMw1otqoVsYwlEnlD8mIfY2TV03r20Y0CN7uqx1tQogjPL" crossorigin="anonymous">

The basic bootstrap grid structure is made of col (columns) in a row in a container:

<div class="container">
   <div class="row">
      <div class="col">col</div>
   </div>
</div>
↳
col

Bootstrap automatically gives multiple columns equal widths:

<div class="container">
   <div class="row">
      <div class="col">col</div>
      <div class="col">col</div>
      <div class="col">col</div>
   </div>
</div>
↳
col
col
col

The "container" class is responsive, so it will have a different size on different sized screens:

<div class="container">
   <div class="row">
      <div class="col">try</div>
      <div class="col">resizing</div>
      <div class="col">the</div>
      <div class="col">screen</div>
   </div>
</div>
↳
try
resizing
the
screen

The bootstrap grid system has space for 12 total columns for the largest screen width:

col
col
col
col
col
col
col
col
col
col
col
col

You can fine-tune bootstrap columns by specifying their sizes, in terms of how many of the 12 available columns they take up:

<div class="container">
   <div class="row">
      <div class="col-2">col-2</div>
      <div class="col-4">col-4</div>
      <div class="col-6">col-6</div>
   </div>
</div>
↳
col-2
col-4
col-6

Use bootstrap's built-in breakpoints to specify how columns are arranged for different screen sizes:

For example, these three columns have 2-4-6 widths above md (768px) screen width, then the auto-sizing behavior (full container widths) for smaller screens:

<div class="container">
   <div class="row">
      <div class="md:col-2">md:col-2</div>
      <div class="md:col-4">md:col-4</div>
      <div class="md:col-6">md:col-6</div>
   </div>
</div>
↳
md:col-2
md:col-4
md:col-6

Links