HTML Table rowspan and colspan

HTML Table rowspan and colspan are useful to use multiple rows and columns.

HTML ROW SPAN

In HTML, the rowspan attribute is used to specify how many rows a table cell should span or cover vertically within an HTML table. It is an attribute that can be applied to <td> (table data) or <th> (table header) elements.

Here’s how rowspan works:

  1. Value: The rowspan attribute takes a numerical value greater than or equal to 1. This value represents the number of rows the cell should span.
  2. Usage: When you apply rowspan to a cell, it causes that cell to extend vertically over the specified number of rows, merging the cells in those rows into one larger cell.

HTML COL SPAN

In HTML, the colspan attribute is used to specify how many columns a table cell should span or cover horizontally within an HTML table. It is an attribute that can be applied to <td> (table data) or <th> (table header) elements.

Here’s how colspan works:

  1. Value: The colspan attribute takes a numerical value greater than or equal to 1. This value represents the number of columns the cell should span.
  2. Usage: When you apply colspan to a cell, it causes that cell to extend horizontally over the specified number of columns, merging the cells in those columns into one larger cell.

HTML rowspan Example

HTML rowspan Example

HTML Colspan example

HTML Rowspan and Colspan Example

College Time Table

College Time table HTML Table
Candidate Profile Using HTML Table rowspan and colspan

HTML Invoice Format

HTML Table rowspan and colspan Invoice foramt

HTML table colspan and rowspan example for Hotel Menu

HTML table colspan and rowspan example for Hotel Menu

Here we discussed the uses of HTML Table rowspan and colspan with examples.

Read More

HTML Images

HTML List