<!DOCTYPE html>
<html>
<head>
    <title>legend element example</title>
<style>
fieldset{
    width: 0px;
}
legend {
    background-color: #000;
    color: #fff;
    padding: 3px 6px;
}
.output {
    font: 1rem 'Fira Sans', sans-serif;
}
input {
    margin: .4rem;
}
</style>
</head>
<body>
    <form action="index.html" method="post">
        <fieldset>
            <legend>Registration</legend>
            <label>Your Name :</label>
            <input type="text" name="name" placeholder="Name"><br>
            <label>Your Email :</label>
            <input type="email" name="email" placeholder="Email"><br>
            <label>Password :</label>
            <input type="password" name="password" placeholder="Password"><br>
            <label>Confirm Password :</label>
            <input type="password" name="password" placeholder="Password"><br>
            <input type="submit" value="Register">
        </fieldset>
    </form>
</body>
</html>