HTML Colspan Attribute
Có thể bạn quan tâm
HTML colspan Attribute « Previous All HTML Attributes Next »
« Previous All HTML Attributes Next »
Definition and Usage
The colspan attribute defines the number of columns a table cell should span.
Applies to
The colspan attribute can be used on the following elements:
Elements | Attribute |
---|---|
<td> | colspan |
<th> | colspan |
Examples
Td Example
An HTML table with a table cell that spans two columns:
<table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$100</td> </tr> <tr> <td colspan="2">Sum: $180</td> </tr> </table> Try it Yourself »Th Example
An HTML table with a header cell that spans two columns:
<table> <tr> <th colspan="2">Monthly Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> Try it Yourself »Browser Support
The colspan attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
td | Yes | Yes | Yes | Yes | Yes |
th | Yes | Yes | Yes | Yes | Yes |
Từ khóa » Html Colspan Javascript
-
HTML DOM TableData ColSpan Property - W3Schools
-
HTML Td Colspan Attribute - W3Schools
-
ColSpan Property (td, Th) JavaScript - Dottoro Web Reference
-
Set Colspan/rowspan For A Cell - Javascript - Stack Overflow
-
Javascript Reference - HTML DOM TableData ColSpan Property
-
Javascript DOM TableData Get And Set Column Span Property
-
Table Rowspan And Colspan In HTML Explained (With Examples) »
-
HTML Colspan Attribute - HTML Tutorials - W3resource
-
iaColSpan - Web APIs | MDN
-
The Table Element - HTML: HyperText Markup Language | MDN
-
HTML | DOM TableData ColSpan Property - GeeksforGeeks
-
HTML DOM TableHeader ColSpan Property - GeeksforGeeks
-
HTML Th Colspan Attribute - W3Schools
-
How To Change Colspan=“6” To Colspan =“4” In TD Using JQuery ...