wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Bootstrap Grid System Worksheet

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

What happens if a .col-6 is placed outside a .row but inside .container?

a)

It behaves exactly like normal

b)

It converts into inline-block

c)

Grid structure breaks and spacing becomes incorrect

d)

It becomes full-width automatically

e)

Bootstrap throws a console warning

2.

<div class="row">

<div class="col-5"></div>

<div class="col-8"></div>

</div>

How many columns will this occupy?

a)

Both stay in same row and shrink

b)

Bootstrap throws an error

c)

Second column moves to next line

d)

Columns overlap each other

e)

First column moves down

3.

What does .col-12 col-md-6 mean?

a)

Always takes 6 columns

b)

12 columns on md, 6 on small

c)

12 on mobile, 6 on md and above

d)

Only works on desktop screens

e)

6 columns only on tablets

4.

Bootstrap follows which layout strategy?

a)

Desktop-first

b)

Mobile-first

c)

Tablet-first

d)

Fixed-width layout

e)

Fluid-only layout

5.

If no breakpoint is mentioned (col-6), it applies to:

a)

Desktop only

b)

All screen sizes

c)

Mobile only

d)

Tablets only

e)

Large screens only

6.

What happens if total columns = exactly 12?

a)

Columns wrap

b)

Content overflows

c)

Fits perfectly in one row

d)

Columns shrink

e)

Last column hides

7.

Why should we avoid margin-left/right on .col-*?

a)

It removes internal padding

b)

It breaks grid alignment

c)

It hides content

d)

It affects height

8.

.container-fluid differs from .container because:

a)

It has no padding

b)

It is non-responsive

c)

It spans full viewport width

d)

It removes rows

e)

It disables grid

9.

What does m-5 equal in pixels?

a)

16px

b)

24px

c)

48px

d)

56px

e)

64px

10.

What does ml-auto do in a flex container?

a)

Centers the element

b)

Moves element left

c)

Pushes element to right

d)

Removes margin

e)

Adds padding

11.

Which class hides an element on medium and above screens?

a)

d-none

b)

d-md-none

c)

d-sm-none

d)

d-lg-none

e)

invisible-md

12.

Which statement is TRUE?

a)

visibility:hidden removes space

b)

d-none keeps space

c)

d-none removes space

d)

Both remove element from DOM

e)

Both behave same

13.

What happens if both m-3 and mt-5 are applied?

a)

m-3 overrides everything

b)

mt-5 overrides top margin

c)

Bootstrap throws error

d)

Browser ignores one

e)

Both margins add up

14.

Which utility changes visual order only?

a)

position

b)

float

c)

order-*

d)

z-index

e)

display

15.

15. Why does <img> not break into a new line by default?

a)

It is inline

b)

It is block

c)

It is flex

d)

It is absolute

e)

It is floated

16.

Why is <span> preferred inside <p>?

a)

Semantic meaning

b)

Inline behavior

c)

SEO benefit

d)

Block rendering

e)

Accessibility

17.

Which element always occupies full width?

a)

span

b)

a

c)

div

d)

img

e)

strong

18.

What happens if a block element is placed inside <span>?

a)

Works normally

b)

Browser crashes

c)

Invalid HTML

d)

Converts to inline

e)

Span becomes block

19.

Which property is NOT inherited?

a)

color

b)

font-family

c)

margin

d)

text-align

e)

visibility

20.

Which selector has highest specificity?

a)

.box

b)

div

c)

#box

d)

div.box

e)

*

21.

If two rules have same specificity, which wins?

a)

First declared

b)

Last declared

c)

Inline style

d)

ID selector

e)

Browser default

22.

Inline styles are discouraged because:

a)

they make maintenance difficult

b)

they improve performance

c)

they enhance code readability

d)

they promote code reuse

23.

Which overrides everything?

a)

ID selector

b)

Inline style

c)

!important

d)

Class selector

e)

Browser style

24.

Which CSS property is inherited by default?

a)

border

b)

background-color

c)

color

d)

width

e)

padding

25.

Order of specificity (low → high):

a)

ID → Class → Type

b)

Type → Class → ID

c)

Class → ID → Type

d)

Inline → ID → Class

e)

Universal → Inline → ID

26.

Default direction of linear-gradient()?

a)

Left → Right

b)

Bottom → Top

c)

Top → Bottom

d)

Center → Edge

e)

Diagonal

27.

Which unit is relative to parent?

a)

px

b)

rem

c)

%

d)

vh

e)

vw

28.

What does transparent do?

a)

Removes element

b)

Hides content

c)

Shows background behind element

d)

Deletes color

e)

Makes element invisible

29.

In a Bootstrap .row, how do you vertically center columns of different heights?

a)

.justify-content-center

b)

.align-items-center

c)

.text-center

d)

.align-self-center

e)

.center-block

30.

Which keeps image height proportional when width changes?

a)

Fixed height

b)

Default behavior

c)

position

d)

overflow

e)

z-index