Home | Contact Us

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

HTML legend Tag

HTML legend 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 <legend> tag

HTML <legend> tag is used to insert a title or caption to its parent element such as <fieldset>. The <legend> element must be the first child of <fieldset > element.

By using <legend> tag with <form> elements, it is easy to understand the purpose of grouped form elements.


<legend> Content........<legend>

Following are some specifications about the HTML <legend> tag

Display block
Start tag/End tag Both Start and End tag
Usage textual


<!DOCTYPE html>
<title>Legend Tag</title>
 <h1>Example of Legend Tag</h1>	
		<legend>Employee 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>
		<input type="Submit"><br>
Test it Now


HTML legend tag


Tag-specific attributes:

Attribute Value Description
  • top
  • bottom
  • left
  • right
It specifies the alignment of the caption.
(Not Supported in HTML5)

Global attribute:

The <legend > tag supports the global attributes in HTML

Event attribute:

The <legend> tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
Next TopicHTML lists

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