The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Your final example is still far from ideal. How about scrapping the idea of a table for this kind of thing all together?

Tables are for tabular data. The above example is not this case, because the data isn't tabular. Tabular data is where you have columns defining fields (such as Name, Hours/Week, Salary) and you have many rows containing this information, For example:

The for attribute value should correspond to the id of a element. So the inputs in the above example should have a id attribute with a value of hoursperweek and salary. The for attribute does not correspond to the name attribute.

The for attribute value should correspond to the id of a element. So the inputs in the above example should have a id attribute with a value of hoursperweek and salary. The for attribute does not correspond to the name attribute.

Actually, a definition list could be more appropriate, but then you won't have a wrapping element for each field and label pair. This can become a problem so you should be aware of it before choosing to use a definition list. I stick to the ul for that very reason.

Actually, a definition list could be more appropriate, but then you won't have a wrapping element for each field and label pair. This can become a problem so you should be aware of it before choosing to use a definition list. I stick to the ul for that very reason.

A bit of CSS should sort that out though. If it is more semantically correct, I think I will go with a definition list.

This is one thing CSS can't easily sort out. If you need a encapsulating item for each label / input pair your going to have major problems using a definition list. Its much easier to use a ul - there's no shame in it.

There's a certain rule I try to stick to as much as possible, and that is to avoid having a tag with just one child tag inside it, unless that child tag is dependent on that parent tag.

For example, when you open the <body /> tag. There's NO point in putting just <div /> inside that, which is what alot of people do. Instead you can style the <body /> just like that div, so it isn't required.

Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona

I abide by the same rule. The only thing I don't do now is use the body as the direct wrapper because of ie6/ie7 buggy behavior. For the most part setting position: relative; as a body declaration clears issues up...