Which CSS property aligns the entire table horizontally?
A
text-align B
margin C
float D
vertical-align
Analysis & Theory
Using `margin: 0 auto;` centers the table horizontally.
How do you center a table horizontally in its container?
A
text-align: center; B
margin: 0 auto; C
float: center; D
align: center;
Analysis & Theory
`margin: 0 auto;` centers a block-level element like a table horizontally.
Which CSS property aligns text inside table cells horizontally?
A
text-align B
vertical-align C
cell-align D
align-text
Analysis & Theory
`text-align` controls horizontal alignment of content inside cells.
Which CSS property aligns content vertically inside table cells?
A
vertical-align B
text-align C
align-content D
cell-align
Analysis & Theory
`vertical-align` sets vertical alignment of content inside cells.
What is the default horizontal alignment of text inside table cells?
A
center B
left C
right D
justify
Analysis & Theory
By default, text inside table cells is left-aligned.
What is the default vertical alignment of content inside table cells?
A
top B
middle C
bottom D
baseline
Analysis & Theory
The default vertical alignment inside table cells is `baseline`.
Which CSS property can be used to float a table to the right?
A
float: right; B
align: right; C
text-align: right; D
table-align: right;
Analysis & Theory
`float: right;` floats the table to the right side of its container.
Can `text-align` center a table element itself?
A
Yes, always B
No, `text-align` affects inline content, not block elements like tables C
Only in Firefox D
Only with `display: inline-table;`
Analysis & Theory
`text-align` centers inline content inside containers, but tables are block-level by default.
How can you vertically align a table cell’s content to the middle?
A
vertical-align: middle; B
align-content: middle; C
text-align: middle; D
line-height: middle;
Analysis & Theory
`vertical-align: middle;` vertically centers cell content.
Which of the following aligns text inside all cells of a table to the right?
A
table { text-align: right; } B
table td { text-align: right; } C
table th { text-align: right; } D
table { align: right; }
Analysis & Theory
Applying `text-align: right;` on all `<td>` elements aligns cell text to the right.