HostSearch.com - helping  you find a home for your web site iWeb.ca
Host Search Showcase Promotions Quote Reviews Interviews
News Host Tour Articles Hosting FAQs Webmaster Host Lab Forum
Domain Registration | Website Templates | Dynamic DNS | Domain Redirection | Web Design Tips & Tutorials
Low Cost E-commerce Shared Unix Windows ASP ASP.NET Dedicated Adult Reseller VPS Canadian UK
iWeb.ca
Hot Deals!
Earn residual income
Join now & get 120% commission from Referback!
HostDepartment - $4.95/Mo
NO LIMIT Plan, Free Domain 4 LIFE, 6 Mo. Free
LYPHA's Amazing Deal
250GB Web Space, 6TB Xfer, UNLIMITED domains!
eBoundhost.com
24/7 Supp, UNLIMITED domains, 300G HD, 3,000G BW
Hostway Hosting
Solutions for every size business.Free Consultation
HostRocket - $4.99!
1000GB Disk Space Unlim. Bandwidth & 6 Months Free!
HostForWeb - $4.95!
100% Satisfaction Or Your Money Back!
Hostgator
Partners
Web Hosting by NetNation
INetU Managed Hosting
Dedicated Server by NetNation
Website Hosting by Apollo

Web Hosting Search
Shared Web HostingDedicated Web HostingReseller Web Hosting
Price:   Platform: UNIX/Linux Windows Search

HostSearch > Webmaster > Web Design Tips & Tutorials >

Tables

This is caption.
This is header. The letters in this section are bold. We are bold because we are in <TH> tag. <TH> means Table Header.
This cell is wider than others because the colspan was set = 2. This text is in a regular cell. This cell has more vertical space because the rowspan was set = 2.
This text is in a regular cell. This text is in a regular cell. This text is right/bottom align.

Here is the HTML code that makes this table; here also is a description of what the code does. Following this example, you will understand the basic rules and be able to build your own table.

<table border="1" cellpadding="5" cellspacing="5">
The border of the table was specified as 1 pixel. If you want an invisible table border, just set it to 0.
Cellpadding (spacing within cells themselves) = 5 pixels.
Cellspacing (spacing between each cells) = 5 pixels.
<caption align="top">This is caption.</caption>
Caption tag show the caption above the table.
<tr>
Telling a browser that we are opening a table's row.
<th bgcolor="#FFFFCC">This is header</th>
<th bgcolor="#FFFFCC">The letters in this section are bold.</th>
<th bgcolor="#FFFFCC">We are bold because we are in &lt;TH&gt; tag.</th>
<th bgcolor="#FFFFCC">&lt;TH&gt; means Table Header</th>

<th> tag refers to "Table Header". Characters within this tag will be shown bold. Like the <td> tag, the <th> tag can have the value of background color specified. This is not in the HTML 3.2 standard, but this additional attribute is supported by both Netscape and Explorer. You can also put background="your_image.gif" as a background, but only Explorer supports table background.
</tr>
Close the row.
<tr>
Open new row
<td colspan="2">This cell is wider than others because the colspan was set = 2.</td>
<td>This text is in a regular cell.</td>
<td rowspan="2">This cell has more vertical space because the rowspan was set = 2.</td>

<TD> = table data. COLSPAN is the number of columns spanned by the cell. ROWSPAN is the number of rows spanned by the cell. Both have a default at 1.
</tr>
Close the row.
<tr>
Open new row
<td>This text is in a regular cell.</td>
<td>This text is in a regular cell.</td>
<td align="right" valign="bottom">This text is right/bottom align.</td>


ALIGN is for horizontal. Its default value is "left". VALIGN is for vertical. Its default value is "middle".
</tr>
</table>

Now you know the basics of how to build a table and what table attributes are. You may adjust and use tables in many circumstances.

Top Web Hosts from Web Hosting Search Results
LFC Hosting
FodyHost
DiscountASP.NET

Add a Host | Web Host Center | Advertising | Contact Us | Help | Webmaster Resources | Link Exchange
Web Hosting Info Network: HostSearch.com | WebHostingMall.com | TheWebHostBiz.com
©1997-2008 Clicksee Network Co., Ltd. All rights reserved. | Privacy Policy | Copyright | About Us | Site Map