Why does someone want to wrap form elements inside <div> tags?
For instance. here is a simple form (which I often use):
<form class="login">
<input class="login_username" type="text" value="username"/>
<input class="login_password" type="text" value="password"/>
<input type="submit" value="Login"/>
</form>
But I read several books and often see some of my friends:
<form class="login">
<div class="login_username">
<input class="login_input" type="text" value="username"/>
</div>
<div class="login_password">
<input class="login_password" type="text" value="password"/>
</div>
<input type="submit" value="Login"/>
</form>
The difference is that they often wrap all the components inside the div tag and then assign its class name (although there is only one component inside the div tag). I do not know what are the advantages when they do it.
Thank:)
+4