ad

Friday, December 12, 2025

how to use html Search input type

how to use html Search input type

web designing theory

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>
             <label for="searchg">Google Search</label>
             <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"

input type  Attribute use to specify type of <input> display the default type input.
Step 5]

   Closing tag


  </body>
</html>

how to use html Search input type
Output