html form tag
snippet in html

html form

user284

<form action="/action.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" value="Mike"><br><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" value="Walker"><br><br>
  <input type="submit" value="Submit">
</form>

html forms

user2719

<form action="/page/"></form>
<input type="text">
<input type="password">
<input type="email">
<input type="date">
<input type="url">
<input type="image">
<input type="search">
<input type="checkbox" name="">
<input type="button">
<input type="number">
<input type="color">
 
<input type="radio" name="radio" id="radio1" value="radio1selected">
<input type="radio" name="radio" id="radio2" value="radio1selected">
<input type="radio" name="radio" id="radio3" value="radio1selected">
 
 
<select name="Meal" id="Meal">
<option value="Steak">Steak</option>
<option value="Fish">Fish</option>
</select>
 
 
<input type="text" placeholder="hint text">
 
<label for="username">Enter a username</label>
<input type="text" placeholder="Enter username" id="username">

form action html

user5700

On submit, send the form-data to a file named "action_page.php" (to process the input):

<form action="/action_page.php" method="get">
  <label for="fname">First name:</label>
  <input type="text" id="fname" 
    name="fname"><br><br>
  <label for="lname">Last name:</label>
  
    <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit">
</form>
  
 

html form attributes

user8496

<form action="/action_page.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Doe"><br><br>
  <input type="submit" value="Submit">
</form>
The <form> tag is used to create an HTML form for user input.

The <form> element can contain one or more of the following form elements:

<input>
<textarea>
<button>
<select>
<option>
<optgroup>
<fieldset>
<label>
<output>

form tag main attributes 
 1. action : contains url of the page where form data get redirected on submit button click
 2. method : contains method in which way it tranfer the data i.e get,post
  
    a. get : this method shows the form data along the url in browser address bar
    b. post : this method does not show any form data in url it transfer data in hidden form
---------------------------------------------------------------------------------------------
  
Example below : 
//An HTML form with two input fields and one submit button:
    <form action="/action_page.php" method="get">
      <label for="fname">First name:</label>
      <input type="text" id="fname" name="fname"><br><br>

      <label for="lname">Last name:</label>  
      <input type="text" id="lname" name="lname"><br><br>

      <input type="submit" value="Submit">
    </form>

intput field submit button

user2043

  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname"><br>

html form tag

user9813

The <form> tag is used to create an HTML form for user input.

The <form> element can contain one or more of the following form elements:

<input>
<textarea>
<button>
<select>
<option>
<optgroup>
<fieldset>
<label>
<output>

form tag main attributes 
 1. action : contains url of the page where form data get redirected on submit button click
 2. method : contains method in which way it tranfer the data i.e get,post
  
    a. get : this method shows the form data along the url in browser address bar
    b. post : this method does not show any form data in url it transfer data in hidden form
---------------------------------------------------------------------------------------------
  
Example below : 
//An HTML form with two input fields and one submit button:
    <form action="/action_page.php" method="get">
      <label for="fname">First name:</label>
      <input type="text" id="fname" name="fname"><br><br>

      <label for="lname">Last name:</label>  
      <input type="text" id="lname" name="lname"><br><br>

      <input type="submit" value="Submit">
    </form>