legend

The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any.

<form action="" method="post">
 <fieldset>
 <legend>User credentials</legend>
 <label for="username">Username</label>
 <input type="text" name="username" id="username">
 <label for="password">Password</label>
 <input type="password" name="password" id="password"> 
 </fieldset>
</form>
User credentials
Read more on w3.org