Articles → HTML → Fieldset in HTML

Fieldset in HTML






Purpose





Syntax


<fieldset>
  <legend>Login</legend>
</fieldset>





Example


<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <form action="Page1.html" method="post">
        <fieldset>
            <legend>Login</legend>
            User Name: <input type="text"><br>
            Password: <input type="password">
        </fieldset>
    </form> 
</body>
</html>



Output



Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Monday, December 19, 2016

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250