0% found this document useful (0 votes)
20 views

Tables Styles HTML

Uploaded by

captainricardus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Tables Styles HTML

Uploaded by

captainricardus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML Table Colspan &

Rowspan
❮ PreviousNext ❯

HTML tables can have cells that span over multiple rows and/or columns.

NAME

APRIL

2022

FIESTA

HTML Table - Colspan


To make a cell span over multiple columns, use the colspan attribute:

Example
<table>
<tr>
<th colspan="2">Name</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>43</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>57</td>
</tr>
</table>
Try it Yourself »
Note: The value of the colspan attribute represents the number of columns to
span.

HTML Table - Rowspan


To make a cell span over multiple rows, use the rowspan attribute:

Example
<table>
<tr>
<th>Name</th>
<td>Jill</td>
</tr>
<tr>
<th rowspan="2">Phone</th>
<td>555-1234</td>
</tr>
<tr>
<td>555-8745</td>
</tr>
</table>
Try it Yourself »
Note: The value of the rowspan attribute represents the number of rows to span.

ADVERTISEMENT
Exercise?
What is the correct HTML attribute for specifying how many rows a cell should span?

span

rowspan

spanning

You might also like