TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML fieldset Tag

HTML fieldset Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

HTML <fieldset> tag

HTML <fieldset> tag is used to group the logically related fields/labels contained within an HTML form.

The use of this tag is optional while creating an HTML form but using <filedset>, it is easy to understand the purpose of grouped elements of form.

The <legend> tag is used with the <fieldset> element as a first child to define the caption for the grouped related fields.

Syntax

<fieldset>.....</fieldset>

Following are some specifications about the HTML <fieldset> tag

Display Block
Start tag/End tag Both Start and End tag
Usage Structural (Within HTML Form)

Example 1

<!DOCTYPE html>
<html>
<head>
<title>fieldset Tag</title>
<style>
	p{
	   color: #db7093;
	   margin-left: 440px;
	   font-size: 40px;
	   font-weight: bold;
		}
	form{
             color: white;
	width: 600px;
             height: 300px;
	margin: auto;
	margin-top: 30px;}
	div{
	background-color: #28455e;
		}
                  .tx{
	margin-left: 20px;
		}
</style>
</head>
<body>
 <h1>Example of fieldset Tag</h1>
 <p>User Feedback Form</p>
 <div>
 <form class="wd">
	 <fieldset class="wd">
		<legend>User basic information:</legend>
		<label>First Name</label><br>
		<input type="text" name="fname"><br>
		<label>Last Name</label><br>
		<input type="text" name="lname"><br>
		<label>Enter Email</label><br>
		<input type="email" name="email"><br><br>
     </fieldset><br>
	<label class="tx">Enter your feedback:</label><br>
	<textarea class="tx" cols="30"></textarea><br><br>
	 <input  class="tx" type="Submit"><br>
  </form>
 </div>
</body>
</html>
Test it Now

Output:

HTML fieldset tag

Attribute

HTML Tags List = New in HTML5.

Tag-specific attribute

Attribute Value Description
disabledHTML Tags List disabled It specifies that all form controls within the fieldset element are disabled.
formHTML Tags List form_id It specifies the one or more form(s) to which fieldset controls belongs.
nameHTML Tags List text It specifies the name associated with fieldset. It will not display at the browser and useful with JS.

Global attribute

HTML < fieldset > tag supports the global attributes in HTML

Event attribute

HTML < fieldset > tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<fieldset>YesYesYesYesYes




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf