The Holy Grail layout typically has narrow sidebars and a wider main content area. Using col-2 for each sidebar and col-8 for main content sums to 12 columns, fitting the grid perfectly.
<div class="container">
<header>...</header>
<div class="row">
<aside class="col-2">Left</aside>
<main class="col-8">Content</main>
<aside class="col-2">Right</aside>
</div>
<footer>...</footer>
</div>Which CSS selector will style only the main content area?
The main content uses the <main> tag with class col-8. The selector main.col-8 targets it specifically.
<div class="container">
<header class="bg-primary text-white p-3 text-center">Header</header>
<div class="row">
<aside class="col-2 bg-light p-3">Left Sidebar</aside>
<main class="col-8 p-3">Main Content</main>
<aside class="col-2 bg-light p-3">Right Sidebar</aside>
</div>
<footer class="bg-secondary text-white p-3 text-center">Footer</footer>
</div>What will the user see in the browser?
The header uses bg-primary (blue) and text-white. Sidebars have bg-light (light gray). Footer uses bg-secondary (gray) and text-white. The row arranges sidebars and main content horizontally.
The role="main" explicitly marks the main content area, helping screen readers skip to it easily. Other roles like banner and navigation are for header and menus.
The Holy Grail layout needs sidebars to hide or move below main content on small screens to keep content readable. Bootstrap's grid helps but requires careful use of responsive classes and order utilities.
