HyperTextMarkupLanguage

HTML Advanced Functions


| Home | Agenda | Next |

TR, TD, TH Continued

        COLSPAN allows you to merge cells across columns
        ROWSPAN allows you to merge cells across rows

For example, the following code:

        <HTML>
        <HEAD>
        <TITLE>Example of a Table</TITLE>
        </HEAD>
        <BODY>
        <TABLE BORDER>
        <TR>
                <TH COLSPAN=2></TH>
                <TH>Employee<BR>Name</TH>
        </TR>
        <TR ALIGN=CENTER>
                <TH ROWSPAN=2>Employee 1</TH>
                <TH>First</TH>
                <TD>John</TD>
        </TR>
        <TR ALIGN=CENTER>
                <TH>Last</TH>
                <TD>Smith</TD>
        </TR>
        </TABLE>
        </BODY>
        </HTML>
Would produce:

Example of a Table
Employee
Name
Employee 1 First John
Last Smith


| Home | Agenda | Next |

T10D014