Saturday, October 20, 2012

HTML Table Tag 3


Chapter 11


HTML Tables with Headers

Example 10:

<html>
<body>

<h4>Table headers:</h4>
<table border="1">
<tr>
  <th>First Name</th>
  <th>Gender</th>
  <th>school</th>
</tr>
<tr>
  <td>Stefen</td>
  <td>Male</td>
  <td>yyyyyyy</td>
</tr>
</table>

<h4>Vertical headers:</h4>
<table border="1">
<tr>
  <th>First Name:</th>
  <td>Stefen</td>
</tr>
<tr>
  <th>Gender</th>
  <td>Male</td>
</tr>
<tr>
  <th>School</th>
  <td>yyyyyyy</td>
</tr>
</table>

</body>
</html>

Output is:

Table headers:

First NameGenderschool
StefenMaleyyyyyyy

Vertical headers:

First Name:Stefen
GenderMale
Schoolyyyyyyy


No comments:

Post a Comment