Bootstrap MCQs – Grid System

11.) Which Bootstrap class makes a column span all available columns?

A) .col-auto
B) .col-full
C) .col-span
D) .col-all

Answer: Option A

Explanation: The .col-auto class makes a column size itself based on its content, using available space dynamically.

12.) What happens when a .row-cols-3 class is applied?

A) All columns take 1/3 width automatically
B) Only three columns are allowed
C) Columns are stacked
D) Columns disappear

Answer: Option A

Explanation: The .row-cols-3 class automatically divides a row into three equal columns.

13.) What happens if column widths exceed 12 units in a Bootstrap row?

A) The layout breaks
B) Extra columns wrap to the next line
C) The columns shrink automatically
D) The columns overlap

Answer: Option B

Explanation: Bootstrap wraps excess columns onto a new row to maintain responsiveness.

14.) Which Bootstrap 5 class allows columns to have equal width?

A) .col-auto
B) .col-equal
C) .col
D) .col-full

Answer: Option C

Explanation: The .col class distributes equal width to columns without specifying a fixed size.

15.) What is the role of .row-cols-* classes in Bootstrap?

A) To define column height
B) To specify the number of columns per row
C) To add spacing between rows
D) To align columns vertically

Answer: Option B

Explanation: .row-cols-* classes define how many columns a row should contain, regardless of screen size.

16.) What does the .justify-content-between class do?

A) Aligns columns in the center
B) Moves columns to the left
C) Stretches columns to fit the row
D) Distributes columns evenly with space between

Answer: Option D

Explanation: .justify-content-between spreads columns out, with equal space in between.

17.) What is the purpose of .align-items-center in a Bootstrap grid row?

A) Aligns content horizontally
B) Centers content vertically
C) Distributes columns evenly
D) Makes columns full-width

Answer: Option B

Explanation: The .align-items-center class centers column content vertically in a row.

18.) Which class adds equal spacing between Bootstrap columns?

A) .col-spacing
B) .row-equal
C) .g-*
D) .col-margin

Answer: Option C

Explanation: The .g-* classes (e.g., .g-3) set equal padding (gutters) between columns.

19.) How do you nest Bootstrap columns inside another column?

A) Nesting is not supported
B) Use .col-nest class
C) Use .container-nest
D) Wrap columns inside another .col-*

Answer: Option D

Explanation: To nest columns, place a .row inside a .col-* container.

20.) What class should be used for a full-width container with padding?

A) .container-fluid
B) .container
C) .container-full
D) .row-full

Answer: Option A

Explanation: .container-fluid provides a full-width layout while maintaining Bootstrap’s built-in padding.

Leave a Reply

Your email address will not be published. Required fields are marked *