top left
The HTML Source Logo


 html
Top Right
    
 Getting StartedHow Do I...TroubleShootingPromotionContact Us
 html
HTML
SEARCH THE SITE
advanced search



CATEGORIES
Home
Getting Started
HTML Cheat Sheet
Webmaster Tools
HTML Help Forum
Color Codes
Link to us









































bottom
HTML HTML HTML HTML
How Do I Span Cell horizontally?


You can combine cells in a row to make one large cell.

How to do it

To span a cell, in your <TH> or <TD> tag for the cell you want to span across columns, type COLSPAN="?".

Next replace the ? with the number of columns you want the cell to span across. Your code should look like this:

<TH COLSPAN="?">

or

<TD COLSPAN="?">

EXAMPLE

<TABLE BORDER="5">
<TR>
<TH COLSPAN="4">Football Stats</TH>
</TR>
<TR>
<TH>Team</TH>
<TH>Games</TH>
<TH>Wins</TH>
<TH>Losses</TH>
</TR>
<TR>
<TD>Eagles</TD>
<TD>5</TD>
<TD>5</TD>
<TD>0</TD>
</TR>
<TR>
<TD>Jets</TD>
<TD>5</TD>
<TD>4</TD>
<TD>1</TD>
</TR>
<TR>
<TD>Little Giants</TD>
<TD>4</TD>
<TD>2</TD>
<TD>2</TD>
</TR>
</TABLE>



Seeing this in the browser would look like this:

Football Stats
Team Games Wins Losses
Eagles 5 5 0
Jets 5 4 1
Little Giants 4 2 2



< BACK







Company   |   Careers   |   Partners   |   Advertising   |   Help
Privacy Policy   |   Trademark Notices   |   User Agreement
© 2001 TheHTMlSource.com, INC. All Rights Reserved.



Site hosted by Angelfire.com: Build your free website today!