Font size
WorksheetsUnderstanding CSS Box Model and Tables
Total questions: 11
Worksheet time: 12mins
What is the CSS Box Model primarily used for?
Creating animations
Structuring HTML content
Styling text
Understanding how browsers build boxes around HTML elements
Which property is used to control the space between the content and the border of a box in the CSS Box Model?
Margin
Padding
Border
Width
In a CSS table, what does the `border-collapse: collapse;` property do?
It adds space between table cells
It removes space between table cells
It changes the border color
It makes the table responsive
What is the purpose of the `
To define the table's header
To provide a label for the table
To define the table's primary data rows
To add a footer to the table
Which CSS property is used to set the width of a table to a percentage of its enclosing container?
`table-layout`
`width`
`border`
`padding`
What does the `nth-child` pseudo-class selector do in CSS?
It selects the first child of an element
It selects elements based on their type
It selects an element based on its order among siblings
It selects the last child of an element
In the context of CSS, what does the `vertical-align: top;` property do to table cells?
Aligns the text to the bottom of the cell
Centers the text vertically in the cell
Aligns the text to the top of the cell
Justifies the text within the cell
Which CSS property is used to change the background color of table headers?
`text-color`
`background-color`
`color`
`border-color`
What is the effect of using `tr:nth-child(even)` in a CSS rule?
It selects all odd-numbered rows
It selects all even-numbered rows
It selects the first row only
It selects the last row only
Why is semantic coding important in HTML tables?
It makes the table load faster
It improves the table's appearance
It makes the data easier to understand
It reduces the file size of the HTML document
Correctly label the different parts of the Box Model
border
content
margin
padding
