HTML Table rowspan colspan

antelove19

Falah Al Fitri

Posted on December 20, 2021

HTML Table rowspan colspan

Cell that spans two rows

To make a cell span more than one row, use the rowspan attribute.


Cell that spans two columns

To make a cell span more than one column, use the colspan attribute.


        <table style="width:100%">

            <tr>
                <th rowspan="2">No</th>
                <th colspan="2">Driver</th>
                <th colspan="2">Team</th>
            </tr>

            <tr>
                <th>Image</th>
                <th>Name</th>
                <th>Logo</th>
                <th>Name</th>
            </tr>

            <tr>
                <td>1</td>
                <td>img1</td>
                <td>name1</td>
                <td>logo1</td>
                <td>name1</td>    
            </tr>

            <tr>
                <td>2</td>
                <td>img2</td>
                <td>name2</td>
                <td>img2</td>
                <td>name2</td>
            </tr>

        </table>
Enter fullscreen mode Exit fullscreen mode

Embed replt

💖 💪 🙅 🚩
antelove19
Falah Al Fitri

Posted on December 20, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

My HTML Documentation
undefined My HTML Documentation

March 9, 2022

HTML Table rowspan colspan
html HTML Table rowspan colspan

December 20, 2021