![]() |
The colspan attribute in an HTML table is used to specify the number of columns a cell should span horizontally. It enables you to merge multiple adjacent table columns into a single cell, making it useful for creating tables with complex layouts or merging cells across multiple columns. The purpose of colspan is as follows:
SyntaxThis specifies that a cell should span two columns in a table. Adjust the value of to match the number of columns the cell should occupy. <td colspan="2"> Example: Illustrattion of the HTML Table colspan attribute. HTML
Output: |
Reffered: https://www.geeksforgeeks.org
HTML |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 17 |