col-5?Bootstrap's grid divides the row into 12 equal parts. If the sum of column sizes exceeds 12, the extra columns wrap to the next line. Here, 5 + 5 + 5 = 15, which is more than 12, so the third column moves to the next line.
Each column should take 6 out of 12 columns to be equal width. Option C uses col-6 twice, making two equal halves.
<div class="row">
<div class="col-8">
<div class="row">
<div class="col-6">A</div>
<div class="col-6">B</div>
</div>
</div>
<div class="col-4">C</div>
</div>The outer row divides into 8 and 4 columns. Inside the 8-column area, a nested row divides it into two equal halves (6 and 6) of that 8-column space. So A and B share the left side equally, and C is on the right side.
Using semantic elements like <main> and <section> helps screen readers and assistive technologies understand the page layout better. Options A, B, and D reduce accessibility.
<div class="row"> <div class="col-4 special">One</div> <div class="col-4">Two</div> <div class="col-4 special">Three</div> </div>
Which CSS selector will style only the columns with class
special inside a Bootstrap row?The selector .row > .special targets elements with class special that are direct children of elements with class row. This matches the two columns with special class. Other options either select wrong elements or no elements.