What is the difference between Rowspan and Colspan?

Updated By: Vimal Singh

D

Dinesh Mukharjee

29 October 2020

Rowspan Property in HTML Table


Row span is an HTML table property that is used to specify the number of rows a cell should span.

For Example: If you pass the row-span property value of 3, it will stretch across three cells horizontally in the table.



Colspan Property in HTML Table


Col span is an HTML table property that is used to specify the number of columns a cell should span.

For Example: If you pass the col span property value of 3, it will stretch across three cells vertically in the table.



Difference Between Rowspan and Colspan in HTML Table


  • Actually, both techniques Rowspan and Colspan are used to increase the size of a particular cell in a table horizontally & vertically.
  • The row-span is a property added to a table cell horizontally (rowspan="pass_value") as well col-span is a property added to a table cell vertically (colspan="pass_value").
  • Both properties row span & col-span are tag attributes.
  • The row-span attribute is used for rows as well as the col-span attribute is used for columns.


1 votes

Your Answer

Advertise With Us

Email us for details: advertise@gdatamart.com

Legal Policy
Sitemap & Support
International
© 2021 GDATAMART.COM (All Rights Reserved)