HTML Tables Flashcards
allow web developers to arrange data into rows and columns.
HTML Tables
defines HTML table
<table>
</table>
table header
<th>
</th>
table row
<tr>
</tr>
table data/cell
<td>
</td>
by default, the text in <th> elements are…
bold and centered
by default, the text in <td> elements are..
regular and left-aligned
the data containers of the table. They can contain all sorts of HTML elements; text, images, lists, other tables, etc.
<td>
</td>
add border to a table using CSS
table, th, td {
border: 1px solid black;
}
let the table borders collapse into one border using css
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
specifies the space between the cell content and its borders
cell padding
specifies the space between the cells
border spacing
will border-spacing still have an effect even if the table has collapsed borders?
no, it will not have an effect
make a cell span more than one column
colspan attribute
make a cell span more than one row
use the rowspan