Team LiB
Previous Section Next Section

Using Tables to Build Pages

If you want your page to appear in a tabular format, you can use the table tags to build the page. Here is an example (see Figure 21-6):

<html>
      <head>
            <title> This is a basic Web Page! </title>
      </head>
      <body>
            <table width="100%" border="1">
            <tr>
                <td width="25%" rowspan="3">My Navigation Bar</td>
                <td width="75%">PageTitle</td>
            </tr>
            <tr>
                <td>
                    <table width="100%" border="1">
                    <tr>
                        <td width="50%"> Column One </td>
                        <td width="50%"> Column Two </td>
                    </tr>
                    </table>
                </td>
            </tr>
            <tr>
                 <td>Footer</td>
            </tr>
            </table>
      </body>
</html>
Click To expand
Figure 21-6: A table added to an HTML page

The rowspan attribute can be applied to a <td> tag (also known as a cell tag) to combine several rows into a single cell. Similarly, the colspan attribute combines several columns.


Team LiB
Previous Section Next Section