The HTML & lt; fieldset & gt; tag groups related elements in the form, and the fieldset form

Source: Internet
Author: User

The HTML <fieldset> label groups related elements in the form, and the fieldset form.

<Fieldset> the label packs a part of the Form Content and generates a set of related form fields.

When a group of form elements are placed in the <fieldset> label, the browser displays them in a special way. They may have special boundaries and 3D effects, or you can even create a subform to process these elements.

<Fieldset> the tag does not have a required or unique attribute.

<Legend> the label defines the title for the fieldset element.

Differences between HTML 4.01 and HTML 5

HTML5 has the following attributes: disabled, form, name, and HTML 4.01 do not support these attributes.

Attribute
Attribute Value Description
Disabled Disabled Fieldset should be disabled.
Form Form_id Specifies one or more forms to which fieldset belongs.
Name Value Specifies the name of fieldset.

Instance:

<! Doctype html> 

The effect is as follows:

 

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.