Can HTML table have variable number of cells on rows?

后端 未结 5 768
情歌与酒
情歌与酒 2020-12-10 11:34

Or should the total amount of cells equal to columns * rows?

A table with different amount of cells on different rows seems to pass the W3 Validator.

5条回答
  •  情话喂你
    2020-12-10 12:06

    You can use colspan, but the sum including the colspan value(s) should be equal for the table to render properly.

    blah
    blah boo

    The first row has one cell but it spans 2 cells because of the colspan, the second row has two cells and this is perfectly valid.

提交回复
热议问题