The HTML <search> Tag

Definition and Usage

<search> The tag is used to define a group of elements related to search.

<search> The elements within an element are typically used as form elements for search operations.

Note:<search> Elements are not rendered as any special styles in the browser. However, you can use CSS to set <search> Styles for elements and their content.

See also:

HTML Reference Manual:<form> tag

HTML Reference Manual:<input> tag

Example

Enclose the search form with the search element:

<search>
  <form>
    <input name="srchw3" id="srchw3" placeholder="Search CodeW3C.com">
  </form>
</search>

Try It Yourself

Global Attributes

<search> The tag also supports Global Attributes in HTML.

Event Attributes

<search> The tag also supports Event Attributes in HTML.

Default CSS Settings

Most browsers will use the following default values to display <search> Element:

search {
  display: block;
}

Try It Yourself

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support