Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML5 <legend> tag


May 03, 2021 HTML5


Table of contents


Html5 is the first child element of the element, which defines the title of the element.

To combine related elements in a form:

<form>
 <fieldset>
   <legend>Personalia:</legend>
   Name: <input type="text" size="30"><br>
   Email: <input type="text" size="30"><br>
   Date of birth: <input type="text" size="10">
 </fieldset>
</form>
Try it out . . .

Browser support

HTML5 <legend> tag HTML5 <legend> tag HTML5 <legend> tag HTML5 <legend> tag HTML5 <legend> tag

Most browsers currently support the hashtag.


Label definition and instructions for use

The element defines the title for the element.


The difference between HTML 4.01 and HTML5

The "align" property has been discarded in HTML 4.01 and is not supported by HTML5. N ot recommended. Use CSS to set the alignment of the elements.


Property

Property Value Describe
align top
bottom
left
right
HTML5 is not supported. H TML 4.01 is obsolete. N ot recommended. /b10>Use styles instead. Define alignment for the title in fieldset.


Global properties

The label supports global properties and views the full property sheet HTML global properties.


The event property

The tag supports all HTML event properties.