Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 5: Understanding CSS Essentials: Layouts

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which vendor prefix do you use to ensure the display of some CSS3 properties and attributes in Internet Explorer?

a)

-moz-

b)

-ms-

c)

-o-

d)

-webkit-

2.

Which of the following is most suitable for a grid layout?

a)

toolbar

b)

form

c)

menu

d)

complex layout, like a newspaper

3.

Which is the oldest model?

a)

CSS Box model

b)

CSS3 Flexbox Box model

c)

CSS3 Grid Layout model

d)

CSS Grid Template Layout Module

4.

Which model includes margin, border, padding, and content?

a)

CSS Box model

b)

CSS3 Flexbox Box model

c)

CSS3 Grid Layout model

d)

CSS Grid Template Layout Module

5.

Which part of the CSS Box model can be transparent or consist of a colored or patterned line?

a)

margin

b)

border

c)

padding

d)

content

6.

The CSS display:flexbox property sets the flexbox as _____element.

a)

an invisible element

b)

an inline element

c)

a block-level

d)

a null element

7.

You have a flexbox with child boxes in a row. You want the child boxes to be displayed in the opposite order in which they appear currently. Which code do you use?

a)

flex-flow: column-reverse

b)

flex-flow: row-reverse

c)

flex-flow: row-order-reverse

d)

flex-flow: reverse

8.

Which CSS property enables you to place child boxes into groups, and then assign a number to each group to affect where they appear within the parent box?

a)

flex-order

b)

flex-item-align

c)

flex-pack

d)

flex

9.

Which property controls the height and width of child boxes?

a)

flex-wrap

b)

flex-item-align

c)

flex-pack

d)

flex

10.

What is a true statement regarding the following code? (Choose all that apply.)

display: flexbox;

display: -ms-flexbox;

display: -moz-flexbox;

display: -o-flexbox;

display: -webkit-flexbox;

flex-flow: column;

-ms-flex-flow: column;

-moz-flex-flow: column;

-o-flex-flow: column;

-webkit-flex-flow: column;

a)

It creates a parent box with child boxes in a column.

b)

It provides support for major Web browsers.

c)

It sets the flex-direction and flex-wrap properties at the same time.

d)

It sets the default alignment of child boxes.

11.

Which of the following are flex-direction property values? (Choose all that apply.)

a)

auto

b)

row-reverse

c)

column

d)

start

12.

The flex property can use which of the following values? (Choose all that apply.)

a)

start

b)

end

c)

2

d)

none

13.

You want child boxes to be able to overflow a flexbox. What code do you use?

a)

flex-wrap: nowrap

b)

flex-wrap: overflow

c)

flex-wrap: none

d)

flex-wrap: wrap

14.

What is a true statement regarding the following code? (Choose all that apply.)

width: -ms-flex(1 75px);

a)

It uses the CSS flex function with the CSS width property.

b)

It uses the CSS flex property with the CSS width attribute.

c)

The flexbox items have a fixed width of 75 pixels.

d)

The flexbox items have a preferred width of 75 pixels.

15.

What does the media=screen attribute of the style property implement?

a)

video playback

b)

photo slideshow playback

c)

adaptation of HTML to screen size

d)

none of the above

16.

Which model defines structures similar to tables? (Choose all that apply.)

a)

CSS Box model

b)

CSS3 Flexbox Box model

c)

CSS3 Grid Layout model

d)

CSS Grid Template Layout Module

17.

You are creating a grid layout. What does 2fr mean in the following code?

-ms-grid-columns: 150px 150px 2fr;

a)

The first two columns will be two fraction units of the stated width.

b)

The third column is two fraction units of the remaining space in the grid.

c)

The second column will be double the stated width.

d)

The third column will be half of the remaining space in the grid.

18.

How many columns and rows are defined in the following code?

section {

display: grid;

grid-columns: 100px 1fr 250px;

grid-rows: 50px 1fr 50px;

}


section header {

grid-column: 2;

grid-row: 1;

}


section nav {

grid-column: 1;

grid-row: 2;

}


section article {

grid-column: 2;

grid-row: 2;

}


section aside {

grid-column: 3;

grid-row: 2;

}


section footer {

grid-column: 2;

grid-row: 3;

}

a)

2 rows and 2 columns

b)

2 rows and 3 columns

c)

3 rows and 2 columns

d)

3 rows and 3 columns

19.

Which grid layout property creates additional columns or rows as needed to accommodate content?

a)

grid-template

b)

grid-flow

c)

grid-column

d)

grid-column-span

20.

You are creating a grid layout template. What do you replace the word TEXT with in the following code if you want all content to appear in the grid?

eeney { grid-position: a; }

meeney { grid-position: b; }

miny { grid-position: c; }

moe { grid-position: d; }


div { grid-template: "TEXT"; grid-rows: auto; grid-columns: auto;}

a)

grid-position

b)

eeney meeney miny moe

c)

all

d)

abcd