W3Schools.com

HTML <td> rowspan Attribute

HTML td Reference HTML <td> tag

Example

An HTML table with a cell that spans two rows:

<table width="100%" border="1">
  <tr>
    <th>Month</th>
    <th>Savings</th>
    <th>Savings for holiday!</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
    <td rowspan="2">$50</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

Try it yourself »
(more examples at the bottom of this page)

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The rowspan attribute is supported in all major browsers.

Note: Only Opera supports rowspan="0", which has a special meaning (look below in the "Attribute Values" table).


Definition and Usage

The rowspan attribute specifies the number of rows a cell should span.


Syntax

<td rowspan="number">

Attribute Values

Value Description
number Specifies the number of rows a cell should span. Note: rowspan="0" tells the browser to span the cell to the last row of the table section (thead, tbody, or tfoot)


Examples

Try it Yourself - Examples

Use of rowspan="0"
This example will only work in Opera, and it demonstrates rowspan="0".


HTML td Reference HTML <td> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE