Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should we use fieldset even for one search box input?

Should we use fieldset even for one search box input? Which we use in header of the site usually?

like image 803
Jitendra Vyas Avatar asked Apr 30 '10 12:04

Jitendra Vyas


2 Answers

No. There is no point in using fieldset elements unless you are dividing the form up into logical sets of fields.

It is excellent for (for example) marking up a set of fields for delivery address and some nearly identical ones for billing address. If you can't make sets (plural) don't use a fieldset element.

like image 96
Quentin Avatar answered Nov 07 '22 05:11

Quentin


I think fieldset's aim is to split your form into semantic parts. If your field is the only one of its semantic part, then you should use a fieldset, as it add semantic.

What you shouldn't do, is to use fieldset for design purpose.

like image 22
Clement Herreman Avatar answered Nov 07 '22 05:11

Clement Herreman