HTML and legend. Tags
In HTML, we can group the information about a form, and the label can be used to combine the relevant elements of the form, representing the title of its parent, the content.To combine related elements in a form:
<fieldset>
<legend>个人信息:</legend>
姓名: <input type="text" size="30"><br>
邮箱: <input type="text" size="30"><br>
生日: <input type="text" size="10">
</fieldset>
</form>
Try it out . . .
Browser support
Most browsers currently support the hashtag.
Label definition and instructions for use
The element defines the title for the element.
The difference between HTML 4.01 and HTML5
The "align" property has been discarded in HTML 4.01 and is not supported by HTML5. N ot recommended. Use CSS to set the alignment of the elements.
Property
属性 | 值 | 描述 |
---|---|---|
align |
top
bottom left right |
HTML5 不支持。 HTML 4.01 已废弃。不建议使用。 请使用样式代替。为 fieldset 中的标题定义对齐方式。 |
Global properties
The label supports global properties and views the full property sheet HTML global properties.
The event property
The tag supports all HTML event properties.