Which CSS property is used to set the width of a table?
A
table-width B
width C
table-size D
size
Analysis & Theory
`width` sets the width of a table or other elements.
How do you set the height of a table in CSS?
A
height B
table-height C
row-height D
cell-height
Analysis & Theory
`height` sets the height of the table or other elements.
Which unit can you use to set table width responsively?
A
px B
% C
em D
All of the above
Analysis & Theory
You can use `px`, `%`, `em`, and other CSS units to set width responsively.
What happens if you set `width: 100%;` on a table?
A
Table takes full width of its container B
Table width becomes 100px C
Table width becomes 100em D
Table height becomes 100%
Analysis & Theory
`width: 100%;` makes the table expand to fill the container’s full width.
Which property controls the minimum width of a table?
A
min-width B
table-min-width C
min-table-width D
min-size
Analysis & Theory
`min-width` sets the minimum width an element (including table) can shrink to.
Which property controls the maximum width of a table?
A
max-width B
table-max-width C
max-table-width D
max-size
Analysis & Theory
`max-width` limits how wide a table or element can grow.
What is the effect of `table-layout: fixed;` on a table's size?
A
Table width is auto-calculated B
Table respects fixed column widths regardless of content C
Table columns become invisible D
Table height is fixed
Analysis & Theory
`table-layout: fixed;` uses fixed widths for columns instead of auto-sizing by content.
How do you set a fixed width for table columns?
A
Using `width` on `<col>` or `<td>` elements B
Using `col-width` on `<table>` C
Using `table-width` on `<tr>` D
Using `cell-width` on `<th>`
Analysis & Theory
You set column widths using the `width` property on `<col>`, `<td>`, or `<th>` elements.
Which unit is NOT commonly used to set table size?
A
px B
em C
percent (%) D
kg
Analysis & Theory
`kg` is not a valid CSS unit; pixels, em, and % are common.
What happens if you don’t set a width on a table?
A
Table will have zero width B
Table will auto-size based on content C
Table will be hidden D
Table will fill the viewport
Analysis & Theory
Without a width, tables size themselves based on their content.