HOW TO MERGE ROW OF A TABLE.

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
HTML 
 875  View(s)
Ratings:
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

  1. Abhishek Srivasatava

    Post:24

    Points:168
    Re: How to merge row of a table.

    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
  1. Hubert Jason

    Post:6

    Points:42
    Re: How to merge row of a table.

    Very True. Perfect answer Abhishek

  1. Abhishek Srivasatava

    Post:24

    Points:168
    Re: How to merge row of a table.

    Thanks Hubert.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!