SBS HTML Logo
CLOSE

HTML Tables: Colspan

The colspan attribute is used to merge columns of a table together. For this example we'll add a border attribute to the table so we can see whats happening.

<table border="1">
    <tr>
        <td colspan="2">This expands through columns 1 and 2</td>
        <td>Column 3</td>
    </tr>
    <tr>
        <td>Colum 1</td>
        <td>Column 2</td>
        <td>Column 3</td>
    </tr>
</table>
Expand

Try this in your file. You'll notice the column with the colspan attribute expands through 2 columns.

Share This Tutorial

Link To This Tutorial

Tutorial URL
https://stepbystephtml.com/tutorial/15/html-beginner-tutorial

HTML Link

Help Us to Help You

This website and it's tutorials are only made possible with your support. Support money goes towards keeping our servers online.

Link to Us

Spread the word! Let people know about our tutorials by placing links on blogs, websites, forums and other places.

HTML Link

Copyright 2017 Step By Step HTML. All Rights reserved.