我在这里找出哪种方式更适合创建更好的html表单:
1。)<form><ul><li><lable>
喜欢:
<form ...>
<fieldset>
<ul>
<li>
<label for="...">Name</label>
<input name="name" value="..." />
</li>
<li>
<label for="...">Email</label>
<input name="Email" value="..." />
</li>
<li>
<label for="...">Address</label>
<input name="address" value="..." />
</li>
<li>
<label for="..."> </label>
<input type="submit" value="..." />
</li>
</ul>
</fieldset>
</form>
2。)<form><dl>
喜欢:
<form ...>
<fieldset>
<dl>
<label for="...">Name</label>
<input name="name" value="..." />
</dl>
<dl>
<label for="...">Email</label>
<input name="Email" value="..." />
</dl>
<dl>
<label for="...">Address</label>
<input name="address" value="..." />
</dl>
<dl>
<label for="..."> </label>
<input type="submit" value="..." />
</dl>
</fieldset>
</form>
答案 0 :(得分:2)
他们使用
<FORM action="submit" method="post">
<LABEL for="user" accesskey="U">name</LABEL>
<INPUT type="text" id="user">
</FORM>
此外,在此链接中,他们将展示如何对表单控件进行分组。