Legend Tag in HTML || How HTML Tag Works
×

HTML LEGEND <legend> Tag

2727

HTML <legend> tag is used for providing a title or caption of <fieldset> Tag. It is used for defining the caption of sets of the fieldset. It is also known as parent tag.

It is coded in html as <legend></legend> having caption between them.

<!DOCTYPE html>
<html>
<head>
<title>Legend Tag</title>
</head>
<body>
<h1>Example of Legend Tag</h1>
<form>
<fieldset>
<legend>Student 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>
</fieldset>
</form>
</body>
</html>

Output:




Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments