This is an ad.
 
Webmonkey Kids
Webmonkey Kids
Lessons
Projects
Playground
Tools

Introduction
icon Rows and Cells
Building Your First Table
Colspan
Rowspan
Alignment
Spacing and Padding
A Few More Tricks



Parents and Teachers:
Find out how your kids can use Webmonkey for Kids as a learning tool at home or in the classroom with our Planning Guide.

Send us feedback

Lesson A: Tables
Colspan


ou can also make a cell in one row stretch across two cells in another. Like this:

    Cell 1
    Cell 3 Cell 4

To accomplish this, you have to use the colspan command. Just add colspan=2 to the <td>, and you'll be all set. "colspan=2" means that that cell should span across two columns.

    <table border>

    <tr>
    <td colspan=2>Cell 1</td>
    </tr>

    <tr>
    <td>Cell 3</td>
    <td>Cell 4</td>
    </tr>

    </table>

Back

Next Page