The HTML5 legend Tag

The primary reason why authors of HTML documents have to use HTML5 <legend> tag is because this is important in providing caption for the <figure>, <fieldset> and <details> elements.

The use of the HTML5 <legend> tag is slightly different as compared to how it is utilized in HTML4.01. In HTML 4.01 the <legend> tag is applicable only for <fieldset> element. For HTML5, this tag is also used for <figure> and <details> elements. Aside from those aspects, align attribute can be used for HTML4.01. On the other hand, this is not accepted in HTML5 anymore because CSS has to be used for formatting.

There is no problem when using the HTML5 <legend> tag. It is compatible with both the Global Attributes and Events Attributes in HTML5. Aside from that, HTML5 <legend> tag is applicable for all the major web browsers like Google Chrome, Internet Explorer, Safari, Opera and Firefox.

Featured pages

Overview

Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …

Tags

Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…

Welcome

 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …