We can use the colspan attribute to make a cell span multiple cols. For better understanding, please have a look at the below example.
Colspan attribute
Full Name | Age | |
---|---|---|
Obama | Lincoln | 28 |
Mark | Henry | 45 |
When you run the above HTML code, you will get the following output in the browser.
We can use the rowspan attribute to make a cell span multiple rows. For better understanding, please have a look at the below example.
Rowspan attribute
Name | Obama Lincoln |
---|---|
Phone | 9588444545 |
9744458266 |
When you run the above HTML code, you will get the following output in the browser.
In the next article, I am going to discuss Table Padding and Spacing in HTML with Examples. Here, in this article, I try to explain Table Colspan and Rowspan in HTML with Examples and I hope you enjoy this HTML Table Colspan and Rowspan with Examples article.