Web Development Lecture 4
Web Development Lecture 4
LECTURE#4
Lecture Outline:
1. HTML tables
HTML Tables
HTML tables allow web developers to arrange data into rows and
columns.
Example:
<table>
<tr> tr = table row
<th>Company</th> th = table heading
<th>Contact</th> td = table data
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
Example:
<table>
<tr>
<td>Emil</td>
<td>Tobias</td>
<td>Linus</td>
</tr>
</table>
Example:
<table>
<tr>
<td>Emil</td>
<td>Tobias</td>
<td>Linus</td>
</tr>
<tr>
<td>16</td>
<td>14</td>
<td>10</td>
</tr>
</table>
Border Color
th, td {
border-color: blue;
}
<table style="width:100%">
th, td {
padding: 15px;
}
th, td {
padding-top: 10px;
padding-bottom: 20px;
padding-left: 30px;
padding-right: 40px;
}