how to use html Search input type
Syntax
Syntax of HTML <input type= "submit"> tag
<input type="submit">
How to use html Search input type
Example
<!DOCTYPE html>
<html>
<head>
<title> HTML Display Search tag </title>
</head>
<body>
<form>
<input type="searchg" id="searchg" name="searchg">
<input type="submit">
</form>
</body>
</html>
how to use html Search input type
Explain Program
Step 1]
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
Step 2 ]
<html>.... . </html>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
<head>
<title> HTML Display Search tag </title>
</head>
- <head> section
- head section contains metadata about page. not visible on the page itself.
- <title> tag title section set the title of the page shows the browser tab.
Step 4]
<body>
<form>
<label for="searchg">Google Search</label>
<input type="searchg" id="searchg" name="searchg">
<input type="submit">
</form>
</body>
HTML <form> tag create form where user enter data and submit.
HTML <input> tag :- Display text.
HTML <label for=" "> :- for attribute use connect this label.
<input type="searchg" id="searchg" name="searchg">
HTML input :- html element get user input.
type="searchg"
Step 5]
Closing tag
</body>
</html>
