Is it best to wrap forms inputs in divs:
<div id="formContainer">
<div>
<label for="username">Username</开发者_如何学Clabel><input type="text" id="username">
</div>
<div>
<label for="password">Password</label><input type="text" id="password">
</div>
</div>
Or is it better to wrap in ul or ol list with list-style-type set to none
<ol id="formContainer">
<li>
<label for="username">Username</label><input type="text" id="username">
</li>
<li>
<label for="password">Password</label><input type="text" id="password">
</li>
</ol>
Or does it matter at all?
I would opt with a definition list:
<dl>
<dt><label for='name'>blah</label></dt>
<dd><input type='text'></dd>
</dl>
I always use table
s because that makes it so easy to align the fields.
精彩评论