Horje

How to add HTML <input type="search">

Define a search field (like a site search, or Google search).

Definition and Usage

The <input type="search"> defines a text field for entering a search string.

Note: Remember to set a name for the search field, otherwise nothing will be submitted. The most common name for search inputs is q.

Tip: Always add the <label> tag for best accessibility practices!


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Syntax

<input type="search">

index.html
Example: HTML
<label for="gsearch">Search Google:</label>
<input type="search" id="gsearch" name="gsearch"> 

Output should be:

How to add HTML <input type="search">




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin