LEGEND <legend> Tag

by Jai 11-Jul-19

0 92


HTML <legend> tag is used for providing a title or caption of <fieldset> Tag. It is used for defining caption of sets of 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:

LEGEND <legend> Tag


Share:


Comments

    No Comments Yet.

Leave a Reply