« Signs of Leek | Main | Turning C from source to a running program »

October 05, 2006

HTML tables - telling whats wrong from the display

Tips on tables .... or how to spot the bug based on what's wrong on the display.

* If text that SHOULD appear in an HTML table appears above the table, then you've not put that text in a <td>...</td> tag set; it's very common for people to add un-necessary <br> tags to move on to the next row and this shoes up as a big white gap above the table!

* If the table appears at the end of your page rather than where you want it, you've probably forgotten your </table> tag. Tables gather up information to be drawn when the end-table tag is found, and if there isn't one there ... ((By the way, if you have a Netscape browser the table won't appear at all if you leave off the </table>))

* If you wanted the table right across your browser window or frame, but it's limited in width, add a width=100% into your <table> tag.

* If you want your table headers to be bold and centred, use a <th>...</th> tag pair rather than a <td>...</td>

* If the table display isn't what you expected, add a border=1 attribute to the <table> tag for testing and debug purposes - then you'll see how the table is constructed.

Posted by gje at October 5, 2006 05:50 PM

Comments

Post a comment




Remember Me?


Well House Consultants Ltd. Copyright 2008