Contact WiredBusinessDesign.com  
Wired Business Design
NEW: How to Make Money with Affiliate Programs, Google AdWords, and Other Advertisers
NEW: Selling Web Design to a Lawyer or Attorney
NEW: How to Get a Website Listed in Google Search

 
HOME
ARTICLES
BUILD A WEBSITE
BUY A DOMAIN NAME
NEED WEB HOSTING?
WEB DEVELOPMENT
CONTACT
LINKS
LINK DIRECTORIES



Learning HTML - Nested Tables
By Kenneth Wilson, WiredBusinessDesign.com. Copyright © 2011. All rights reserved.

A NESTED TABLE is a table within a table cell.

Nested tables are great for fine tuning the layout of your text content. Otherwise, the CELLPADDING command would set equal cellpadding for each cell. The idea of using a nested table is to get around that, and only have CELLPADDING in one cell.

Another way to think of a nested table is to picture a spread sheet, and then look at just one cell in that spread sheet. Now, picture a miniature spreadsheet within that cell.

When learning how nested tables work, I think it's best to just copy and paste sample code, and then study the code, looking to see how the nested table is embedded in a table cell. Then, expirement with changes. For example, you can take the nested table out of one table cell, and place it in another table cell.

This is what the above code looks like, when displayed on a webpage:

Nested table, row 1, cell 1 Nested table, row 1, cell 2
Nested table, row 2, cell 1 (with COLSPAN)
Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

If you look at the colored rectangle above, you'll notice that the text in the yellow area has margins around it, and is not running alongside the borders. That's because of the cellpadding that is set within the table command of the nested table.

If you're new to HTML and it sounds like I'm speaking a foreign language to you, the best thing I can say is to simply study the sample HTML code above, and paste it into a sample webpage you're building in your HTML editor.

Then expirement by using "BGCOLOR" commands to change the color of different cells, and different cells within the nested table.

For example:

Nested table, row 1, cell 1 Nested table, row 1, cell 2
Nested table, row 2, cell 1 (with COLSPAN)
Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

Here's the HTML code for the sample directly above:





 WEB DESIGN ARTICLES FOR WEBMASTERS
The Professional Web Designer

How to Make Money with Affiliate Programs, Google AdWords, and Other Advertisers

Setting Up a Facebook Account for Business

How to Check Back Links

Selling Web Design to a Lawyer or Attorney

Turn Your Site into a Money Maker with Strong Copywriting

How to Make Money on the Internet

Building a Website - Should You Hire a Freelance Designer?

Choosing a Website Designer Skilled at Copywriting

How to Choose the Right Domain Name

How to Get a Website Listed in Google Search

How to Choose a Web Host

How to Join an Affiliate Program

Learning HTML:

Learning HTML - Using TABLES

Learning HTML - Nested TABLES

WIREDBUSINESSDESIGN.COM