The <input> tag with a type="search"
attribute creates a search text field.
Search fields are similar to text fields but are designed for search queries.
An <input> element of type search.
Clicking submit prepopulates the search box in the Google search page.
<form target="_blank" action="https://www.google.com">
<fieldset>
<legend>Search with Google</legend>
<input type="search" name="q" value="rubber duckies"><br /><br />
<input type="submit" value="Submit">
</fieldset>
</form>
The <input type="search">
creates a search input field.
Search fields are used to enter a query. Other than that, they function the same as text fields.
Depending on the browser, search fields may look a bit different from text fields.
<input type="search">
Here is when type="search"
support started for each browser:
Chrome
|
26.0 | Mar 2013 |
Firefox
|
4.0 | Mar 2011 |
IE/Edge
|
10.0 | Sep 2012 |
Opera
|
12.1 | Nov 2012 |
Safari
|
5.1 | Oct 2011 |
Back to <input>