To span a row more than a single row we can use rowspan attribute.
Example:
Group 1 Manish Durg India
Manoj Bhopal India
Group 2 Rohit Banglore India
Nitesh Bhopal India
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <table style="border:1px solid black"> <tbody> <tr> <td>1</td> </tr> <tr> <td>2</td> <td>3</td> <td>4</td> </tr> </tbody> </table> |
Output:
Group 1 | Manish | Durg India |
Manoj | Bhopal India | |
Group 2 | Rohit | Banglore India |
Nitesh | Bhopal India |
To span a column more than a single column we can use colspan attribute.
Example:
1 2 3 4 5 | Durg India Bhopal India Banglore India Bhopal India |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <table style="border:1px solid black"> <tbody> <tr> <td colspan="2">Group 1</td> </tr> <tr> <td>Manish</td> <td>Manoj</td> <td colspan="2">Group 2</td> <td>Rohit</td> <td>Nitesh</td> </tr> </tbody> </table> |
Output:
Group 1 | |
Manish | Durg India |
Manoj | Bhopal India |
Group 2 | |
Rohit | Banglore India |
Nitesh | Bhopal India |