What is a <fieldset> tag?

Experience Level: Junior
Tags: HTML

Answer

The <fieldset> tag:

Example
<html>
<head>
    ...
</head>
<body>
    <form>
        <fieldset>
            <legend>Sign Up:</legend>
            <label for="name">Name</label>
            <input type="text" name="name" id="name"/>
        </fieldset>
    </form>
</body>
</html>
  • Is group of boxes in <form> tag.
  • It helps organize fields in group.
  • Includes <legend> tag for name of the form.
  • Also is paired with <input> tag and <label> tag.
Related HTML job interview questions

Comments

No Comments Yet.
Be the first to tell us what you think.
HTML for beginners
HTML for beginners

Are you learning HTML ? Try our test we designed to help you progress faster.

Test yourself