Home > DeveloperSection > Forums > How to merge row of a table.
Samuel Fernandes
Samuel Fernandes

Total Post:156

Points:1096
Posted on    October-12-2016 4:23 AM

 HTML HTML 
Ratings:


 3 Reply(s)
 597  View(s)
Rate this:

Hi Team

I need to create a table through HTML in which I need to create 3 column, manager, leader and teammate.

Manager has two leader and leader has two team member.

I have tried a lots but not able to success.

Thanks



Abhishek Srivasatava
Abhishek Srivasatava

Total Post:24

Points:168
Posted on    October-12-2016 4:30 AM

Hi Samuel,


You need to use RowSpan. 


RowSpan: It is used when we need to merge rows of the table.


ColSpan: It is used when we need to merge rows 
of the table.


Here is the code for your problem:


<!DOCTYPE html>
<html>
<body>
<table border="1">
<tr>
<th>Manager</th>
<th> Leader</th>
<th>Teammate</th>
</tr>
<tr><td rowspan="2">XYZ</td><td>pqr</td><td>abc</td></tr>
                   <tr><td>stu</td><td>def</td></tr>
 
<tr><td rowspan="2">XYZ</td><td>pqr</td><td>abc</td></tr>
                   <tr><td>stu</td><td>def</td></tr>
 
<tr><td colspan="3">Data Full
</table>
</body>
</html>

Modified On Oct-12-2016 10:41:15 PM

Hubert Jason
Hubert Jason

Total Post:6

Points:42
Posted on    October-17-2016 11:30 PM

Very True. Perfect answer Abhishek

Abhishek Srivasatava
Abhishek Srivasatava

Total Post:24

Points:168
Posted on    October-18-2016 10:56 PM

Thanks Hubert.

Don't want to miss updates? Please click the below button!

Follow MindStick