+ 2
In the following example, I'm creating a simple table with 2 rows and 3 columns. With no colspan, it will have 6 cells. But if I add 'colspan=3' to the first cell in the first row, it will 'span' over 3 columns, taking up the space of all 3 cells of the first row. Therefor I have to remove the markup (code) for cell 2 and 3 to make room for the 'spanning' cell 1: <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> table { border-collapse:collapse; } td { border:1px solid #000; } </style> </head> <body> <table> <tr> <td colspan="3">Content. Content. Content</td> </tr> <tr> <td>Content..</td> <td>Content..</td> <td>Content..</td> </tr> </table> </body> </html>
15th Jun 2016, 2:53 AM
ZinC - avatar