Professional Documents
Culture Documents
HTML Tables
HTML Tables
Table is collection of data in rows and columns. <TABLE> Tag is used to create a table in html. Inside table tag
we use <TR> tag for creating each row and <TH> and <TD> tags are used to fill the data. <TH> stands for table
heading and it shows the text in bold letters and center aligned whereas <TD> Tag shows the data as plain text
in the cell.
Using rowspan and colspan attributes with td and th tag : When a single cell has to occupy more space, like
space covering multiple rows or multiple columns, rowspan or colspan attribute can be used respectively. When
a cell needs to cover multiple columns we use colspan, for eg in the following table the cell in first row is taking
space of three columns thus we write colspan=”3”.