Home Tutorial Html Html5 HTML5 fieldset example, Use of fieldset tag.

 
 

HTML5 fieldset example, Use of fieldset tag.
Posted on: September 6, 2010 at 12:00 AM
Advertisement
In this tutorial you will learn about the Implementation and use of fieldset tag of HTML5.

HTML5 fieldset example, Use of fieldset tag.

Implementation and use of fieldset tag. It is used for grouping related controls of form. It is like a box.
It must start from <legend> tag, because <legend> tag defines title of field set.

Declaration Syntax :

Declaration syntax of fieldset in HTML5.

                            <fieldset> controls</fieldset>

Attributes of fieldset:

Attribute Value Description
disabled boolean  Specify fieldset will be display or not.
name value  Specify name of fieldset.
form name of form  define it is related to this form.

Example of <fieldset> in HTML5:

Code:
filedset_tag_in_html5tag.html
<!DOCTYPE html >
<html>
<head><title>Filedset Tag in HTML5.</title></head>
<body>
<form>
<h1>Example of fieldset tag in HTML5.</h1>
<fieldset >
<legend>Employee Detail.</legend>
Employee ID.<input type="text" name="EmpId"><br>
Employee Name.<input type="text" name="EmpName"><br>
Employee Address.<input type="text" name="Empadress"><br>
</fieldset>
</form>
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The fieldset tag is available in both HTML5 and HTML4.01. But there is some attribute in HTML5, that is not supported by HTML4.01.

Advertisement

Related Tags for HTML5 fieldset example, Use of fieldset tag.:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 6, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com