3.1 Tables Flashcards

(15 cards)

1
Q

What does the <table> tag do?

A

It defines a table for displaying tabular data in rows & columns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the <thead> element used for?

A

Groups the header row(s) in a table for clarity & semantic structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the <tbody> element used for?

A

Groups the main content rows of a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the <tfoot> element used for?

A

Groups the footer rows, often used for totals or summary data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of <tr>?

A

<tr> defines a table row & contains header (<th>) or data (<td>) cells.
</td></th></tr>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the <th> element used for?

A

Defines a table header cell, typically displayed in bold & centered by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is <td> element used for?

A

Defines a table data cell containing actual content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the colspan attribute do?

A

Allows a cell to span multiple columns, e.g, <td colspan="2">.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the rowspan attribute do?

A

Allows a cell to span multiple rows, e.g, <td rowspan="3">.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can <thead>, <tbody>, & <tfoot> be used without <table>?

A

No, they must be children of a <table> element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do browsers treat table elements visually?

A

As a grid layout of rows & columns, with implicit styling if no CSS is used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can you borders to a table with HTML only?

A

Use border=”1” inside <table>, though CSS is prefered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is symantic grouping with <thead>, <tbody>, & <tfoot> important?

A

Enhances accessibility, structure, & style control with CSS/JS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you center text in a table using HTML?

A

Use align=”center” (deprecated), but CSS (text-align) is recommended.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can <th> appear in places other than the first row?

A

Yes, it can be used in any row where a header cell is needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly