<legend> HTML Tag

In this article I will discuss the <legend> HTML Tag.
  • 1371

The HTML legend tag is used for labelling the fieldset element. By using the fieldset tag and the legend tag, you can make your forms much easier to understand for your users.

Example

<html>

<head>

    <title></title>

</head>

<body>

    <form>

    <fieldset>

        <legend>Personal Information:</legend>Name:

        <input type="text" /><br />

        Email:

        <input type="text" /><br />

        Date of birth:

        <input type="text" />

    </fieldset>

    </form>

</body>

</html>


Output


 

Clipboard02.jpg



Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

 

© 2020 DotNetHeaven. All rights reserved.