HTML CSS IMAGES LINKS | |||||||||||||||||||||||||||||||
HTML → The rowsapn and colspan attributes
The rowspan (row span) and colspan (column span) attributes allow us to construct more complex table structures. Both attributes will be specified at the TD level of the table. Consider the next two tables: Rowspan
A simple table:
The ROWSPAN attribute will let us stretch cell ONE to equal the height of both cell TWO and cell FOUR:
Here is the code:
<table border> What ROWSPAN really does is vertically merge adjacent TDs into a single cell. Consider the following table:
Here is the code:
<table border="1">
A simple table:
The COLSPAN attribute will let us stretch cell ONE to colspan the width of both cell THREE and cell FOUR:
Here is the code:
<table border> What COLSPAN really does is horizontally merge adjacent TDs into a single cell.
Here is the code:
<table border="1"> Before constructing a complex table you may wish to draw it on a piece of paper. If your table will include spanning of rows and / or columns you may outline the values of any such attributes by drawing the tables imaginary lines prior to coding that table. |
|||||||||||||||||||||||||||||||
back ↑ |