CodeLab
Tutorials For Everyone
Run
<!Doctype HTML> <html> <head> <title>ColSpan and Rowspan</title> <style> table, th, td{ border: 1px solid #999; border-collapse: collapse; } th, td{ padding: 10px; } </style> </head> <body> <h2>colspan</h2> <p>A cell spans on two columns in the below example.</p> <table style="width: 100%;"> <tr> <th>User</th> <th colspan="2">Telephones</th> </tr> <tbody> <tr> <td>joh</td> <td>19876424</td> <td>12133665</td> </tr> <tr> <td>Nikita</td> <td>13245421</td> <td>19803123</td> </tr> </tbody> </table> <h2>rowspan</h2> <p>A cell spans on two rows in the below example.</p> <table style="width: 100%;"> <tr> <th>User</th> <td>John</td> </tr> <tbody> <tr> <th rowspan="2">Telephones</th> <td>19876424</td> </tr> <tr> <td>19803123</td> </tr> </tbody> </table> </body> </html>