How to use HTML Rowspan Table attribute

In this article we will discuss about the rowspan attribute of the table in HTML.
  • 2266

The rowspan attribute specifies the number of rows a cell should span.

HTML code:

<html>
<head>
    <title></title>
</head>
<body>
    <table border="1" cellpadding="5" cellspacing="5" width="100%">
        <tr>
            <th rowspan="3">
                Name
            </th>
            <td>
                Teena
            </td>
        </tr>
        <tr>
            <td>
                Rahul
            </td>
        </tr>
        <tr>
            <td>
                Ajay
            </td>
        </tr>
    </table>
</body>
</html>

Output:

Name Teena
Rahul
Ajay

Here rowspan="3" means 3 rows have been span by table header Name.

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.