HTML5 's FieldSet label

Source: Internet
Author: User
Tags element groups

Definition and usage

The FIELDSET element groups related elements within a form, drawing a caption, like a panel in a WinForm development.

<fieldset> tags Package a portion of the form's content to generate a field for a set of related forms. The <fieldset> tag does not have a required or unique attribute.

When a set of form elements is placed inside the <fieldset> tag, the browser displays them in a special way, they may have special boundaries, 3D effects, or even create a sub-form to process the elements.

Differences between HTML 4.01 and HTML 5

There are some new properties in HTML 5, and some of the properties in HTML 4.01 are no longer supported.

Properties
Properties value Description HTML4 HTML5
Disabled true | False Defines whether the fieldset is visible. X
Form true | False Defines one or more forms that the fieldset belongs to. X

Standard properties

Class, Contenteditable, ContextMenu, dir, draggable, id, Irrelevant,lang, ref, Registrationmark, TabIndex, template, Title

Event Properties

Onabort, onbeforeunload, onblur, onchange, onclick, Oncontextmenu,ondblclick, Ondrag, Ondragend, OnDragEnter, OnDragLeave, Ondragover,ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, Onkeyup,onload, OnMessage, OnMouseDown, OnMouseMove, onmouseover, Onmouseout,onmouseup, OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, OnUnload

This example shows how to draw a box with a caption around the data.

"text" /></label><label> Weight: <input type="text  " /></label></form></fieldset><p> if there is no border around the form, your browser is too old. </p></body>

Demo effect

Tests are valid in Ie8,firefox,opera,safari,chrome

Reference: http://www.devdo.net/html5-fieldset.html

HTML5 's FieldSet label

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.