I don’t know about you guys, but I don’t use a lot of markup for the layout of the form.
Here is the markup for a simple log form (without layout markup, i.e. divs, tables, etc.)
<form method="post"> <label>Username</label> <input type="text" name="username" /> <label>Password</label> <input type="password" name="password" /> <input type="submit" name="Log In" /> </form>
Here is the CSS for the form
label,input{float:left} label,input[type="submit"]{clear:left}
Here is the result

The amazing thing about this is:
- Lack of markup
- Lack of CSS
- Flexibility
If you look at css, the label element clears to the left (and floats to the left). This means that the label will float with its mate input , however each label will be a new line.
This makes it VERY EASY to add additional inputs. Even post verification messages
Take this form for example
<form method="post"> <label>Name</label> <input type="text" name="username" /> <label>Password</label> <input type="password" name="password" /> <label><abbr title="Date of Birth">DOB</abbr></label> <input type="text" name="dob_day" /> <input type="text" name="dob_month" /> <input type="text" name="dob_year" /> <input type="submit" name="Log In" /> </form>
Using this CSS
label,input{float:left} label,input[type="submit"]{clear:left} input[name^="dob_"]{width:44px;margin:2px} label{width:70px}
We get

It's really that simple:)
Using this concept, you create a huge number of opportunities, and you will never have to use a table for layout again!