html input form code example

Example 1: html submit button

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

Example 2: html form

<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>

Example 3: html input types

<form>
  <input type="button">
  <input type="checkbox">
  <input type="color">
  <input type="date">
  <input type="datetime-local">
  <input type="email">
  <input type="file">
  <input type="hidden">
  <input type="image">
  <input type="month">
  <input type="number">
  <input type="password">
  <input type="radio">
  <input type="range">
  <input type="reset">
  <input type="search">
  <input type="submit">
  <input type="tel">
  <input type="text">
  <input type="time">
  <input type="url">
  <input type="week">
</form>

Example 4: input html

<!--This text will not be shown -->
<!--Text --> <input type="text">
<!--Text(the input will turn into dots) --> <input type="password">
<!--button --> <input type="button">
<!--number(only a number can be entered) --> <input type="number">
<!--radio button(small and round button) --> <input type="radio">

Example 5: html form

<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 By Duco Defiant Dogfish on Feb 11 2020
<form action="/action_page.php">
  First name:<br>
  <input type="text" name="firstname" value="Mickey"><br>
  
  Last name:<br>
  <input type="text" name="lastname" value="Mouse"><br><br>
  
  <input type="submit" value="Submit">
</form>

Tags:

Html Example