How To Format A Table Within Another Table
By admin on Jan 8, 2010 | In Free Web Design Tutorials | Send feedback »
Follow up:
The code for this page is as below:
You can see it uses the standard table tag, with 450 pixels wide, border of 1, means it's one pixel wide, so it'll be visible, also the table has been aligned in the center, and has been given a white background.
Within the table, there is just one row, specified by the tr tag, and within this row is the td tag which stands for table data, this is also known as a table cell, the most basic element of a table and a placeholder for the information within the table.
Each table cell needs to have a pair of the td tag around it, so within this table cell, you can see a line of paragraphs, just says some text, then you close the paragraph, then the table data, then the table row, then the table itself, in that specified order:
What you will see now is how you can add a table within a table, so now make some space under text line, you can add another table under this paragrah:
This will add a table with a width of 200 pixels, a border width of 1 pixel, a background color of yellow right to the center of the existing table, with some text sitting in the table cell.
So now you added a table within another table, this table has a yellow background, and this is often handy for adding testimonials to your sales page or product websites, or even for some side notes within your main documentation.
You can see how it appears in a web browser, with one table sitting inside another table:
Feedback awaiting moderation
This post has 2 feedbacks awaiting moderation...
Leave a comment
| « How To Structure Your Website Using Tables | How to Format Borders For Your Tables » |



