views:

91

answers:

3

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

+1  A: 

To my mind, it's not necessary unless you want some sort of frame container or parent-child type styling or grouping on the page.

Dave Markle
+1  A: 

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.

Clement Herreman
+1  A: 

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.

David Dorward
@David Dorward - but i saw today on http://www.webstandards.org/ they are marking up searchbox like this `<form action="/index.php" method="get" id="fm-search"> <fieldset> <legend>Search</legend> <label for="s"><span>Search WaSP</span> <input value="" class="search" name="s" id="s"></label> <input type="submit" value="Go!" name="submit" class="submit"> </fieldset> </form>`
metal-gear-solid
One organization doing something doesn't automatically make it useful to do so.
David Dorward