wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Css flexbox

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

How can you align items along the cross-axis in a Flexbox container?

a)

align-items: center;

b)

justify-items: center;

c)

vertical-align: center;

d)

align-content: center;

2.

What property is used to create space between Flexbox items along the main axis?

a)

margin

b)

padding

c)

gap

d)

space-between

3.

How do you make a Flexbox container wrap its items to the next line if they don't fit in the current row?

a)

flex-wrap: wrap;

b)

wrap-items: true;

c)

flex-direction: column;

d)

flex-flow: row wrap;

4.

What does the justify-content property control in a Flexbox container?

a)

Cross-axis alignment of items.

b)

Main-axis alignment of items.

c)

Spacing between items.

d)

Item ordering.

5.

How can you make an individual Flexbox item take up all available space along the main axis?

a)

flex: 1;

b)

grow: 1;

c)

flex-grow: 1;

d)

size: fill;

6.

Which property is used to align a single Flexbox item within the container?

a)

align-self

b)

item-align

c)

self-align

d)

flex-align

7.

In Flexbox, what does the order property control?

a)

The order of the container in the document flow.

b)

The order of Flexbox items within the container.

c)

The order of Flexbox lines within a multi-line container.

d)

The order of the items along the cross-axis.

8.

What is the default value of the flex-direction property in a Flexbox container?

a)

row

b)

column

c)

row-reverse

d)

column-reverse

9.

What is the purpose of the flex-shrink property in Flexbox?

a)

It determines the initial size of a flex container.

b)

It controls the ability of a flex item to shrink if necessary.

c)

It sets the minimum size of a flex container.

d)

It defines the maximum size of a flex item.

10.

How can you center both horizontally and vertically in a Flexbox container?

a)

align-items: center; justify-content: center;

b)

center: true;

c)

flex-align: center; flex-justify: center;

d)

position: center;

11.

How can you make a Flexbox item take up a specific fraction of the available space along the main axis?

a)

size: 50%;

b)

flex: 1;

c)

grow: 0.5;

d)

flex-basis: 50%;

12.

How can you reverse the order of Flexbox items along the main axis?

a)

order: reverse;

b)

flex-order: reverse;

c)

flex-direction: row-reverse;

d)

order-reverse: true;

13.

In a Flexbox container with flex-direction: column;, how can you align items along the main axis?

a)

justify-items: center;

b)

align-content: center;

c)

justify-content: center;

d)

align-items: center;

14.

The flex property is a shorthand for flex-grow, flex-shrink, and flex-basis.

a)

True

b)

False

15.

The align-items property is used to align items along the main axis in a Flexbox container.

a)

True

b)

False

16.

The align-self property is used to align the entire Flexbox container.

a)

True

b)

False

17.

What css rule creates a flexbox container?

a)

flex: box

b)

display: flexbox

c)

flex: container

d)

display: flex

18.

What are the two options for flex-direction?

a)

row

b)

vertical

c)

column

d)

horizontal

19.

What does the flex-grow property control in Flexbox?

a)

It sets the maximum size of a Flexbox item.

b)

It specifies whether Flexbox items should wrap to the next line.

c)

It controls the ability of a Flexbox item to grow to fill available space.

d)

It adjusts the spacing between Flexbox items.

20.

How can you make a Flexbox container display its items from bottom to top along the main axis?

a)

flex-direction: bottom;

b)

flex-direction: reverse;

c)

flex-direction: column-reverse;

d)

flex-flow: column wrap-reverse;