Horje
How to create HTML Input Type Search

The is used for search fields (a search field behaves like a regular text field).


How is to HTML Input Type Search

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

Full Code Example of HTML Input Type Search

The input type="search" is used for search fields (behaves like a regular text field):
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Search Field</h2>
<p>The <strong>input type="search"</strong> is used for search fields (behaves like a regular text field):</p>

<form action="/action_page.php">
  <label for="gsearch">Search Google:</label>
  <input type="search" id="gsearch" name="gsearch">
  <input type="submit" value="Submit">
</form>

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Search





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference