Tables : Lesson 2

Column Span and Row Span
Column Span means you combine two or more columns and make a single column for that row.

Row Span means you combine two or more rows and make a single row for that column.

These are very useful. Lets have an example.

Interest Rates
Account Details
Account Type Rate Length
Young Saver 2% 1 year
Smart 3% 2 years
Long Haul 4.5% 4 years

<table border = "1">
 Interest Rates
      <th colspan="3">Account Details</th>
      <th> Account Type</th>
      <td>Young Saver</td>
      <td>1 year</td>
      <td>2 years</td>
      <td>Long Haul</td>
      <td>4 years</td>

As you can see that colspan="3" combined three columns into one column. We can de same thing if we want to combine rows.

Tables  1  2  3  4  5  prev  next