NYCPHP Meetup

NYPHP.org

[nycphp-talk] And the HTML CSS guru is....

Kenneth Downs ken at secdat.com
Fri Jan 12 14:31:25 EST 2007


Rob Marscher wrote:
> I think the "proper" use of HTML tables is to display a list of things 
> ordered into rows and columns.  As Chris Snyder pointed out in a 
> previous post in this thread, you can use it for a form of labels and 
> inputs, or for thumbnails and descriptions, as well as traditional 
> tabular data, and I'm sure there's other good uses as well.
>
> Personally, I've been able to get away without using tables for forms 
> by using other html elements like fieldsets and labels and some divs 
> or spans.  For thumbnails and descriptions, I use the definition list 
> html elements (dl, dt, dd) where the thumbnail is contained in the 
> <dt> and the description is in the <dd>.  That could be overkill 
> though...  Some places where I've used actual tables are lists of 
> search results where you have a column for each field in the result 
> and inboxes for messaging where you have rows for each piece of mail.  
> Basically, my rule of thumb is to see what the html looks like with 
> all the styles turned off (can do this by hitting ctrl-shift-s if you 
> have that Web Developer Firefox plugin I recommended) and if it still 
> makes sense, then things are good.
> If your trying to avoid tables for layout, it seems the main place to 
> question yourself is when you find yourself nesting tables inside 
> other tables or you have a table with one row or one cell.

Rob, thanks for a clear explanation of the thinking underneath the word 
"proper" for use of tables.  In particular, the point about nested 
tables or a table with one row or one cell hits home.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ken.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070112/16f0f461/attachment.vcf>


More information about the talk mailing list