WorksheetsLesson 5: Understanding CSS Essentials: Layouts
Total questions: 20
Worksheet time: 10mins
Which vendor prefix do you use to ensure the display of some CSS3 properties and attributes in Internet Explorer?
-moz-
-ms-
-o-
-webkit-
Which of the following is most suitable for a grid layout?
toolbar
form
menu
complex layout, like a newspaper
Which is the oldest model?
CSS Box model
CSS3 Flexbox Box model
CSS3 Grid Layout model
CSS Grid Template Layout Module
Which model includes margin, border, padding, and content?
CSS Box model
CSS3 Flexbox Box model
CSS3 Grid Layout model
CSS Grid Template Layout Module
Which part of the CSS Box model can be transparent or consist of a colored or patterned line?
margin
border
padding
content
The CSS display:flexbox property sets the flexbox as _____element.
an invisible element
an inline element
a block-level
a null element
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?
flex-flow: column-reverse
flex-flow: row-reverse
flex-flow: row-order-reverse
flex-flow: reverse
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?
flex-order
flex-item-align
flex-pack
flex
Which property controls the height and width of child boxes?
flex-wrap
flex-item-align
flex-pack
flex
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;
It creates a parent box with child boxes in a column.
It provides support for major Web browsers.
It sets the flex-direction and flex-wrap properties at the same time.
It sets the default alignment of child boxes.
Which of the following are flex-direction property values? (Choose all that apply.)
auto
row-reverse
column
start
The flex property can use which of the following values? (Choose all that apply.)
start
end
2
none
You want child boxes to be able to overflow a flexbox. What code do you use?
flex-wrap: nowrap
flex-wrap: overflow
flex-wrap: none
flex-wrap: wrap
What is a true statement regarding the following code? (Choose all that apply.)
width: -ms-flex(1 75px);
It uses the CSS flex function with the CSS width property.
It uses the CSS flex property with the CSS width attribute.
The flexbox items have a fixed width of 75 pixels.
The flexbox items have a preferred width of 75 pixels.
What does the media=screen attribute of the style property implement?
video playback
photo slideshow playback
adaptation of HTML to screen size
none of the above
Which model defines structures similar to tables? (Choose all that apply.)
CSS Box model
CSS3 Flexbox Box model
CSS3 Grid Layout model
CSS Grid Template Layout Module
You are creating a grid layout. What does 2fr mean in the following code?
-ms-grid-columns: 150px 150px 2fr;
The first two columns will be two fraction units of the stated width.
The third column is two fraction units of the remaining space in the grid.
The second column will be double the stated width.
The third column will be half of the remaining space in the grid.
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;
}
2 rows and 2 columns
2 rows and 3 columns
3 rows and 2 columns
3 rows and 3 columns
Which grid layout property creates additional columns or rows as needed to accommodate content?
grid-template
grid-flow
grid-column
grid-column-span
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;}
grid-position
eeney meeney miny moe
all
abcd
