Class Flow
Complete one task → save → refresh → verify output using responsive view.
1) Setup
2) Grid Basics
3) Responsive Control
4) Advanced Grid
Outcomes
Target- Explain
container,row,col - Build equal/unequal columns and nested grid
- Apply breakpoints, offset, order, wrapping, gutters
- Predict behaviour across screen sizes
Setup
Tools- VS Code / Notepad++
- Chrome (Responsive view)
- Bootstrap already loaded via
header-lab.php
Testing Method
Must- Open DevTools → Toggle device toolbar
- Test 3 sizes: mobile / tablet / desktop
- Take screenshots for selected tasks
IN-CLASS PRACTICAL – BOOTSTRAP GRID
From Core Grid → Responsive → Advanced Control
Follow tasks in order. Save and refresh after each task.
Task 1
Setup
Create Folder & File
Goal: Prepare a clean workspace.
Student steps:
- Create a folder:
RegNo_BootstrapGrid - Create a file inside:
index.html - Open the folder in VS Code
Example folder name:
10DDT23F1705_BootstrapGrid
Task 2
Setup
Create Basic HTML Skeleton
Goal: Valid HTML page (Bootstrap will be tested later).
Student steps:
- Open
index.html - Type
!then press Tab - Set the title to
Bootstrap Grid Practical - Save file
Expected HTML skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap Grid Practical</title>
</head>
<body>
</body>
</html>
Task 3
Baseline
Baseline Content (Plain Blocks)
Goal: See default stacking behaviour before using grid classes.
Student steps:
- Inside
<body>, paste the blocks below - Save → refresh in browser
- Confirm: everything stacks vertically
Paste inside <body>
<h1>Grid Practical</h1>
<div>Block A</div>
<div>Block B</div>
<div>Block C</div>
✅ Expected observation:
- Each block is full-width
- Everything stacks vertically
Task 4
Grid Basics
Wrap Content with Container
Goal: Understand how
horizontal padding.
.container controls page width and horizontal padding.
Update body content
<div class="container">
<h1>Grid Practical</h1>
<div>Block A</div>
<div>Block B</div>
<div>Block C</div>
</div>
Task 5
Grid Basics
Create Row + Auto Columns
Goal: Activate the grid using
.row and .col.
Student steps:
- Inside the container, replace Block A/B/C with a
<div class="row">. - Add three columns using:
col,col,col. - Save the file and refresh the browser.
- Confirm: all three columns appear side-by-side with equal width.
Grid activation
<div class="container">
<h1>Grid Practical</h1>
<div class="row">
<div class="col">Column A</div>
<div class="col">Column B</div>
<div class="col">Column C</div>
</div>
</div>
✅ Expected observation:
- Three equal-width columns appear in one row.
- Without
.col, the grid will not activate.
Task 6
Three Equal Columns
Build 3 Equal Columns (Desktop/Tablets)
Goal: Make 3 equal columns using a 12-column grid concept.
Student steps:
- Inside the container, create a new
row - Add 3 columns using:
col-md-4each - Save → refresh
- Test responsive view: mobile should stack, md+ should align
Task 6 code
<div class="row mt-3">
<div class="col-md-4">col-md-4</div>
<div class="col-md-4">col-md-4</div>
<div class="col-md-4">col-md-4</div>
</div>
Task 7
Three Unequal Columns
Build 3 Unequal Columns (3–6–3)
Goal: Observe width differences clearly.
Student steps:
- Create a new
rowunder Task 6 - Use:
col-md-3,col-md-6,col-md-3 - Save → refresh
- Verify: centre is wider than left and right
Task 7 code
<div class="row mt-3">
<div class="col-md-3">col-md-3</div>
<div class="col-md-6">col-md-6</div>
<div class="col-md-3">col-md-3</div>
</div>
Task 8
Two Unequal Columns
Build Two Columns (4–8)
Goal: Typical sidebar + content layout.
Student steps:
- Create a new
rowunder Task 7 - Use:
col-md-4andcol-md-8 - Save → refresh
- Verify: one narrow column + one wide column
Task 8 code
<div class="row mt-3">
<div class="col-md-4">Sidebar (col-md-4)</div>
<div class="col-md-8">Main Content (col-md-8)</div>
</div>
Task 9
Nested Grid
Two Columns + Nested Two Columns
Goal: Build grid inside a column (nesting).
Student steps:
- Create a new
rowwith 2 columns:col-md-8andcol-md-4 - Inside the
col-md-8, add anotherrow - Add 2 nested columns:
col-6andcol-6 - Save → refresh and verify nesting works
Task 9 code
<div class="row mt-3">
<div class="col-md-8">
Parent col-md-8
<div class="row mt-2">
<div class="col-6">Nested col-6</div>
<div class="col-6">Nested col-6</div>
</div>
</div>
<div class="col-md-4">col-md-4</div>
</div>
Task 10
Responsive Breakpoints
Mobile Stack → Desktop Columns
Goal: Use
col-12 + col-md-* for responsive behaviour.Student steps:
- Create a new
row - Use:
col-12 col-md-8andcol-12 col-md-4 - Save → refresh
- Test: mobile stacks, desktop becomes 2 columns
Task 10 code
<div class="row mt-3">
<div class="col-12 col-md-8">Main Content</div>
<div class="col-12 col-md-4">Sidebar</div>
</div>
Task 11
Offset
Offset Column (Move to the Right)
Goal: Create space before a column using
offset-*.Student steps:
- Create a new
row - Add one column:
col-md-4 offset-md-4 - Save → refresh
- Verify: the column appears centred-ish (pushed right)
Task 11 code
<div class="row mt-3">
<div class="col-md-4 offset-md-4">Centered Column</div>
</div>
Task 12
Order
Change Visual Order (Without Changing HTML)
Goal: Use
order-* to rearrange columns.Student steps:
- Create a new
rowwith 3 columns - Apply
order-*as shown - Save → refresh
- Verify: visual order is different from HTML order
Task 12 code
<div class="row mt-3">
<div class="col order-2">First (HTML 1)</div>
<div class="col order-3">Second (HTML 2)</div>
<div class="col order-1">Third (HTML 3)</div>
</div>
Task 13
Wrapping Rule
Columns Wrap When Total > 12
Goal: Observe automatic wrapping.
Student steps:
- Create a new
row - Add
col-9+col-4(total 13) - Save → refresh
- Verify: wrapping occurs (second column drops)
Task 13 code
<div class="row mt-3">
<div class="col-9">col-9</div>
<div class="col-4">col-4 (wrap)</div>
</div>
Task 14
Gutters
No Gutters (Bootstrap Only)
Goal: Remove spacing between columns using
g-0.Student steps:
- Create a new row and add
g-0 - Add 3 columns (any sizes)
- Save → refresh
- Verify: columns touch each other (no gaps)
Task 14 code
<div class="row g-0 mt-3">
<div class="col-md-3">A</div>
<div class="col-md-6">B</div>
<div class="col-md-3">C</div>
</div>
Task 15
Submission
Final Checkpoint + Submission
Goal: Verify all behaviours and prepare evidence.
Student steps:
- Open responsive view (mobile, tablet, desktop)
- Verify Task 6–14 outputs behave correctly
- Take screenshots:
- Task 6 (desktop)
- Task 10 (mobile)
- Task 9 (nested grid)
- Task 12 (order changed)
- Submit: HTML file + screenshots
Teacher marking tip:
You can grade quickly by checking only Task 6, 9, 10, 12, and 14 outputs.