What's the best semantic way to wrap a search area?

I'd like to take advantage of the improved semantics of html5. I'm creating a search area, and the search area should have a background and contain search related things, like autocomplete and search hints.

Is there some consensus around what type of element something like a search area should be wrapped in?

  • Should it be a NAV because searching is a method of navigation?
  • Should it be a SECTION because it's a discreet section of the page?
  • Should it be a DIV because the wrapping of search related elements has no clear semantics?

The markup is something like this:

<?whatElement?>
  <input type="search" placeholder="Search for a name or ID..." required />
  <a href="#" class="search button">Search</a>
</?whatElement?>

Thanks for your thoughts.

7
задан SimplGy 22 December 2010 в 13:46
поделиться