HTML Tables - Lecture 3
HTML Tables - Lecture 3
TABLES
PRESENTING INFORMATION
<tr>
<th>
Table
</th>
<th>
…
</th>
</tr>
THE <TD>…</TD> CONTAINER
Example:
table, th, td {
border: 1px solid black;
}
SINGLE BORDER
• table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
STYLE TABLE BORDERS
• table, th, td {
border: 1px solid white;
border-collapse: collapse;
}
th, td {
background-color: #96D4D4;
}
ROUND TABLE BORDERS
• table, th, td {
border: 1px solid black;
border-radius: 10px;
}
DOTTED TABLE BORDERS
• th, td {
border-color: #96D4D4;
}
•
<TD COLSPAN …> EXAMPLE
<tr>
<td colspan=“2”
bgcolor=“blue”>
</td>
<td>
…
</td>
</tr>
<TD ROWSPAN …> EXAMPLE
<tr>
<td rowspan=“2”
bgcolor=“blue”>
</td>
<td>
…
</td>
</tr>
<TH>…</TH> CONTAINER
<caption align=“center”
summary=“Long Description goes here”
valign="bottom">
Figure 1: Hexadecimal Conversions
</caption>
USING TABLES FOR
MULTIPART IMAGES
• Use a basic table structure
• Set the border, cellpadding and cellspacing
attributes to “0” (zero)
• No spaces or page breaks between tags included
between <td> … </td>!
• Can be used for “Poor Man’s” Image Maps
• Example:
http://www.cs.iupui.edu/~rmolnar/n241/lectures/tablesFiles/index.html