|
||||||||||||
|
Learning HTML - Nested Tables By Kenneth Wilson, WiredBusinessDesign.com. Copright © 2009. 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:
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:
Here's the HTML code for the sample directly above:
WEBDESIGN ARTICLES FOR WEBMASTERS: |
|
||||||||||||||||||||||
|
|
|