<form action="#" method="GET">
  <!-- text field -->
  <label for="username">username</label>
  <input type="text" name="username" id="username">
  <label for="password">password</label>
  <input type="password" name="password" id="password">
  <br>
  <!-- radio button -->
  <!-- Radio buttons with the same "name" attribute are members of a group -->
  <input type="radio" name="gender" value="male">man
  <input type="radio" name="gender" value="female" checked>woman
  <br>
  <!-- checkbox -->
  <input type="checkbox" name="pets" value="dog" checked>Dog
  <input type="checkbox" name="pets" value="cat">Cat
  <input type="checkbox" name="pets" value="bird">Bird
  <input type="checkbox" name="pets" value="fish">Fish
  <!-- submission button -->
  <input type="submit" >
  <!-- reset button -->
  <input type="reset" >
  <!-- push button -->
  <input type="button" name="key" value="label" onclick="">
  <!-- hidden field -->
  <input type="hidden" name="action" value="changes">
</form>
<!-- must specify method and enctype attributes like these if upload file. -->
<form action="#" method="POST" enctype="multipart/form-data">
  <!-- file-selection -->
  <input type="file" accept="image/*" name="upload_file">
  <button type="submit">upoload</button>
  <button type="reset">reset</button>
  <button type="button" name="key" value="not_label" onclick="">just a push button</button>
  
</form>
原文:https://www.cnblogs.com/bit-happens/p/12274709.html