HTML <search> Tag
Example
Surround the search form with a search element:
<search>
<form>
<input name="fsrch" id="fsrch"
placeholder="Search W3Schools">
</form>
</search>
Try it Yourself »
Definition and Usage
The <search>
tag is used to specify that here comes a set of
elements that is related to search.
Elements inside a <search>
elements can typically be form elements
used to perform a search.
Note: The <search>
element does not render as anything special in a browser.
However, you can use CSS to style the <search>
element and its content.
Browser Support
Element | |||||
---|---|---|---|---|---|
<search> | Yes | Yes | Yes | Yes | Yes |
Global Attributes
TThe <search>
tag also supports the Global Attributes in HTML./p>
Event Attributes
TThe <search>
tag also supports the Event Attributes in HTML./p>
Related Pages
The <form> Tag.
The <input> Tag.
Default CSS Settings
MMost browsers will display the <search>
element with the following default values: