Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<search>

An area for searching or filtering on the page.

Syntax

<search><form>…</form></search>

Examples

A site search form:

<search>
  <form action="/search">
    <label>Find a drink <input type="search" name="q"></label>
    <button>Search</button>
  </form>
</search>

Notes

The tag appeared in 2023 and is supported by all modern browsers. It tells screen readers where search is on the page; visually it is no different from a <div>.

See also

  • <form> — A form: collects data from its fields and sends it to the server.
  • <nav> — A block of main navigation: the site menu, a table of contents, breadcrumbs.
  • <input> — An input field; its kind is set by the `type` attribute.

Related recipes

In the tutorial

  • Semantic markup — The neutral div and span and the meaningful header, nav, main, article, section, aside and footer tags for page structure.

Thanks for reading!

Donate to the site — we work hard for you.