tables Flashcards

1
Q

how do you make a table in HTML

A

<table></table>

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

explain table rows

A

<table>
<tr>
</tr>
<tr>
</tr>
</table>

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

table data <td> explain

A

Rows aren’t sufficient to add data to a table. Each cell element must also be defined. In HTML, you can add data using the table data element: <td>.

<table>
<tr>
<td>73</td>
<td>81</td>
</tr>
</table>

In the example above, two data points (73 and 81) were entered in the one row that exists. By adding two data points, we created two cells of data.

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

what are table headings <th></th>

A

<table>
<tr>
<th></th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
<tr>
<th>Temperature</th>
<td>73</td>
<td>81</td>
</tr>
</table>

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

table heading <th></th>

A

th scope=”col”>Saturday</th>
<th scope="col">Sunday</th>
</tr>

<tr>
<th>Temperature</th>
</tr>

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

explain how to create a border using html and css

A

We use CSS to add style to HTML documents, because it helps us to separate the structure of a page from how it looks. You can learn more about CSS in our CSS courses.

You can achieve the same table border effect using CSS.

table, td {
border: 1px solid black;
}

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

explain colspan to Spanning Columns

A

Data can span columns using the colspan attribute. The attribute accepts an integer (greater than or equal to 1) to denote the number of columns it spans across.

<table>
<tr>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
</tr>
<tr>
<td>Out of Town</td>
<td>Back in Town</td>
</tr>
</table>

In the example above, the data Out of Town spans the Monday and Tuesday table headings using the value 2 (two columns). The data Back in Town appears only under the Wednesday heading.

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