How to draw a border around form elements

<fieldset> defines a group of form elements as being logically related. The browser draws a box around the set of fields to indicate that they are related.

The <legend> tag defines a caption for the fieldset element.



<legend>Personal information:</legend>
favorite color: <INPUT NAME=”favecolor”><BR>
<INPUT TYPE=CHECKBOX NAME=”onions”> like green onions<BR>
<INPUT TYPE=CHECKBOX NAME=”cookies”> like cookies<BR>
<INPUT TYPE=CHECKBOX NAME=”kimchee”> like kim chee<BR>

Personal information:

favorite color:

like green onions

like cookies

like chocolates

Posted in Html