colspan
And rowspan
These two properties are used to create special tables.
colspan
The number of columns used to specify the horizontal span of the cell: colspan is the merge column, and the colspan=2 is to merge two columns.
rowspan用来
Specify the number of rows that the cell spans vertically: rowspan is used to merge rows, for example, rowspan=2 is merging two rows,
- RowSpan are commonly used in TD and th tags
- Row: Rows, span: Spans, spans, ranges
- Col: columns, span: Spans, spans, ranges
<Body><TableBorder= "1"width= "+"> <TR> <TD>1</TD> <TD>2</TD> <TD>3</TD> </TR> <TR> <TD>4</TD> <TD>5</TD> <TD>6</TD> </TR></Table></BR><TableBorder= "1"width= "+"> <TR> <TDcolspan=3>Merge the three columns of the first row</TD> </TR> <TR> <TD>4</TD> <TD>5</TD> <TD>6</TD> </TR></Table></BR><TableBorder= "1"width= "+"> <TR> <TDrowspan= "2">Merge two rows of the first column</TD> <TD>2</TD> <TD>3</TD> </TR> <TR> <TD>5</TD> <TD>6</TD> </TR></Table></Body>
The following will be displayed in the browser
colspan and rowspan of HTML form elements