Prop Tableheader Rowspan
# TableHeader rowSpan Property
[ TableHeader Object](#)
## Example
Change the number of rows a cell spans:
document.getElementById("myTh").rowSpan="1";
[Try it Β»](#)
* * *
## Definition and Usage
The rowSpan property sets or returns the value of the rowspan attribute.
The rowspan attribute specifies the number of rows a cell should span.
**Tip:** Use the (#) property to set or return the value of the colspan attribute.
* * *
## Browser Support

The rowSpan property is supported by all major browsers.
* * *
## Syntax
Get the rowSpan property:
_tableheaderObject_.rowSpan
Set the rowSpan property:
_tableheaderObject_.rowSpan=_number_
## Property Values
| Value | Description |
| --- | --- |
| _number_ | Specifies the number of rows a cell should span. |
## Technical Details
| Return Value: | A number, representing the number of rows a cell should span. |
| --- |
* * *
## More Examples
## Example
Return the number of rows a specified table cell should span:
var x = document.getElementById("myTh").rowSpan;
document.getElementById("demo").innerHTML=x;
The _x_ output will be:
2
[Try it Β»](#)
* * *
## Related Articles
HTML Reference Manual: [HTML rowspan attribute](#)
* * TableHeader Object](#)
YouTip