TableData rowSpan attribute
Definition and usage
rowSpan
Attribute sets or returns the value of the rowspan attribute.
<td> rowspan attribute Specify the number of rows a table cell should span.
Tip:Use colSpan attribute Set or return colspan attribute value.
See also:
HTML Reference Manual:HTML <td> Tag
Example
Example 1
Change the number of rows a table cell should span:
document.getElementById("myTd").rowSpan = "1";
Example 2
Return the number of rows a specific table cell should span:
var x = document.getElementById("myTh").rowSpan;
Syntax
Return the rowSpan attribute:
tabledataObject.rowSpan
Set the rowSpan attribute:
tabledataObject.rowSpan = number
Attribute Value
Value | Description |
---|---|
number | Specifies the number of rows the cell should span. |
Technical Details
Return Value: | Number, indicating the number of rows the table cell should span. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related Pages
HTML Reference Manual:HTML <td> rowspan Attribute