fieldset


The <fieldset> tag visually groups logically related fields in an HTML form defined with the <form> tag. The tag allows breaking forms down into logical sections. In browsers, a box around the content is drawn. Syntax The <fieldset> tag comes in pairs. The content is written between the opening (<fieldset>) and closing (</fieldset>) tags.



Click the image to see the actual HTML page. (The form is nonfunctioning, submit won’t get you anywhere.) The form in the example contains one fieldset. It’s simple, but it’s enough to illustrate the point. Look at the various elements in the form. These elements can be styled: fieldset, legend, p, label, input.