Home >> HTML 5 >> legend Tag in HTML 5

legend Tag in HTML 5

The HTML <legend> tag is used to generate a caption for the <fieldset> tag when grouping related items in an HTML form.



For example:-

<!DOCTYPE html>
   <title>legend Tag</title>
    <form name"fieldset" action="" method="post">
         <legend>Personal Detail:</legend>
         <label for="name">Name:</label>
         <input type="text" id="name" name="name">
         <label for="email">Email:</label>
         <input type="email" id="email" name="email">
         <label for="mobile">Mobile No.:</label>
         <input type="text" id="mobile" name="mobile">
         <input type="submit" value="Submit">

Post Your Comment

Next Questions
li Tag
link Tag
ul Tag
video Tag
wbr Tag

Copyright ©2022 coderraj.com. All Rights Reserved.