HTML5 > Structures

Legend in HTML5

How to create a caption using legend in HTML

In previous posts, we learnt how to group elements using fieldset.


By using <legend> we can create a caption on the field set  

            <legend>Please Login</legend>
            Email: <input type="text"><br>
            Password:<input type="password"/><br />
            Date of birth: <input type="text">

In the above code snippet we have created a form, we have legend element to create caption on the fieldset



 Views: 3361 | Post Order: 85

Write for us

Hosting Recommendations