标签的放置位置周围的其他HTML元素或没有? [英] Where to put <label> around other html element or not?
本文介绍了标签的放置位置周围的其他HTML元素或没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在哪里放置其他html元素?
Option1-放置在输入元素周围:
<label>Url:
<input type="text" size="350"/>
</label>
选项2:
<label>Url:</label>
<input type="text" size="350"/>
谢谢
推荐答案
第二个绝对更好,它允许您单独设置样式.
The second is definitely better, it allows you to style separately.
您还可以使用"for"属性将其绑定到输入字段:
You can also use the "for" attribute to bind it to an input field:
http://www.w3schools.com/tags/att_label_for.asp
这篇关于标签的放置位置周围的其他HTML元素或没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文