Fieldset is used to combine all form elements. It displays elements as a block and legends element is used along with fieldset to provide easiness to users.
<form>
<fieldset>
<legend>Form</legend>
<input type=text
/>
</fieldset>
</form>
You can use fieldset and legend elements any where within an HTML document.
Fieldset and Legend are pair tags and output of both is border aound whole element like you can see in above example.
Open notepad or any other text editor, follow the following points.
save file with name task.html or task.htm and then open it using any browser and see results.
Don't forget fieldset and legend are non empty elements which means they always come in pair.