html tutorial - fieldset <fieldset>-tag in HTML - html5 - html code - html form




fieldset tag in html

Learn html - html tutorial - fieldset tag in html - html examples - html programs

  • The <fieldset>tag is used to grouping the related form elements.
  • The <fieldset>tag is used to draws a box around a related elements.
  • Using the <fieldset> tag, you can create your forms and your users are easily understand.
  • And the legend tag also same as the previous point.

Syntax for <fieldset> tag:

<fieldset>content</fieldset>

Differences between HTML 4.01 and HTML5

HTML 4.0.1

  • Not supported in HTML 4.01.

HTML5

  • Supported in HMTL5.

Sample Coding for <fieldset> tag:

Tryit<!DOCTYPE html>
<html >
    <body>
        <form>
            <fieldset>
                <legend>Wikitechy database</legend><br>
                Student Name: <input type="text"><br>
                Email:        <input type="text"><br>
                Date of birth:<input type="text"><br>
            </fieldset>
        </form>
    </body>
</html>

Code Explanation for <fieldset> tag:

code explanation for field tag

  1. The <fieldset>tag is used to group a related elements to form and text boxes are declare for the related elements.
  2. The <legend>tag is used for the caption of the data in fieldset tag.

Output of <fieldset> tag:

output for field tag

  1. Here the output displays the text boxes for the elements by using the <fieldset> tag.

Attribute for <fieldset>tag:

Attribute Value HTML4 HTML5 Description
disabled disabled No Yes It specifies that a group of related form elements disabled
form form_id No Yes It specifies one or more forms which belongs to fieldset.
name text No Yes It specifies a name for the fieldset.

Browser Support for <fieldset> tag in HTML:

Yes Yes Yes Yes Yes

Tips and Notes

  1. The <legend>tag is defined as a caption for the <fieldset>tag.

Related Searches to fieldset tag in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×