wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Understanding CSS Box Model and Tables

Total questions: 11

Worksheet time: 12mins

Name
Class
Date
1.

What is the CSS Box Model primarily used for?

a)

Creating animations

b)

Structuring HTML content

c)

Styling text

d)

Understanding how browsers build boxes around HTML elements

2.

Which property is used to control the space between the content and the border of a box in the CSS Box Model?

a)

Margin

b)

Padding

c)

Border

d)

Width

3.

In a CSS table, what does the `border-collapse: collapse;` property do?

a)

It adds space between table cells

b)

It removes space between table cells

c)

It changes the border color

d)

It makes the table responsive

4.

What is the purpose of the `` element in an HTML table?

a)

To define the table's header

b)

To provide a label for the table

c)

To define the table's primary data rows

d)

To add a footer to the table

5.

Which CSS property is used to set the width of a table to a percentage of its enclosing container?

a)

`table-layout`

b)

`width`

c)

`border`

d)

`padding`

6.

What does the `nth-child` pseudo-class selector do in CSS?

a)

It selects the first child of an element

b)

It selects elements based on their type

c)

It selects an element based on its order among siblings

d)

It selects the last child of an element

7.

In the context of CSS, what does the `vertical-align: top;` property do to table cells?

a)

Aligns the text to the bottom of the cell

b)

Centers the text vertically in the cell

c)

Aligns the text to the top of the cell

d)

Justifies the text within the cell

8.

Which CSS property is used to change the background color of table headers?

a)

`text-color`

b)

`background-color`

c)

`color`

d)

`border-color`

9.

What is the effect of using `tr:nth-child(even)` in a CSS rule?

a)

It selects all odd-numbered rows

b)

It selects all even-numbered rows

c)

It selects the first row only

d)

It selects the last row only

10.

Why is semantic coding important in HTML tables?

a)

It makes the table load faster

b)

It improves the table's appearance

c)

It makes the data easier to understand

d)

It reduces the file size of the HTML document

11.

Correctly label the different parts of the Box Model