Forum Moderators: open
My trouble: My form display correct in IE & Firefox. But I think my code is not semantic enought.
Solution: Could we discuss about the way which is the best for form markup - Semantic.
Example login form:
Quote:
_____Usename *: [Input]
____Passwords *: [Input]
________________[Submit button]
Source code Xhtml:
Use Break per line:
Code:
<form action="WebStandard.html" method="post">
<div id="strictDTD_cheat">
<label for="uName">Username:</label>
<input type="text" name="uName" id="uName" /><br />
<label for="pName">Password:</label>
<input type="text" name="pName" id="pName" /><br />
<input type="submit" name="Submit" value="Submit" />
</div>
</form>
Split form into Division(line)
Code:
<form action="WebStandard.html" method="post">
<div id="username">
<label for="uName">Username:</label>
<input type="text" name="uName" id="uName" />
</div>
<div id="password">
<label for="pName">Password:</label>
<input type="text" name="pName" id="pName" />
</div>
<div id="formActions">
<input type="submit" name="Submit" value="Submit" />
</div>
</form>