Fieldset and legend tags
HTML provides some tags that place an emphasis on certain data and at the same time add some style to a webpage.
This lesson focuses on:
- The <fieldset> tag
- The <legend> tag
The <fieldset> tag
The <fieldset> tag creates a box around certain data that places emphasis on it.
Example:
<fieldset> <h1>This text will have a box around it</h1> </fieldset>
Output:
The <legend> tag
The <legend> tag will add some title text to the box created by the <fieldset> tag.
Example:
<fieldset> <legend> Message </legend> <h1>This text will have a box around it</h1> </fieldset>
Output:




