分類
未分類

Rowspan & Colspan

Attribute of

<th> — table header — A header cell in a <table>.

<td> — table data — A data cell in a <table>.

What does colspan= do?

Allows a single table cell to span the width of more than one cell or column.

What does rowspan= do?

Allows a single table cell to span the height of more than one cell or row.

Why use colspan= or rowspan=?Sometimes it makes sense for a cell to span multiple columns or multiple rows. This might be used for a header cell that titles a group of columns, or a side-bar that groups rows of entries.

Both colspan= and rowspan= are attributes of the two table-cell elements, <th> and <td>. They provide the same functionality as “merge cell” in spreadsheet programs like Excel.

The value of either attribute must be a positive integer (a whole number). The value specifies the number of columns or rows that the cell fills.

Read more: https://html.com/tables/rowspan-colspan/#ixzz66CJNrAFB

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *