This can be accomplished using the

tag.

Contact Info
Extra Details

You can also add CSS rules to the fieldset and legend items such as margin-bottom, borders, fonts and padding.

Group common form elements with fieldsets