HTML

HTML Forms

The <form> Element :
HTML forms are used to collect user input.
<form>
.
form elements
.
</form>
Form elements are different types of input elements, checkboxes, radio buttons, submit buttons, and more.

The <input> Element

The <input> element is the most important form element.
<!DOCTYPE html>
<html>
<body>

<form>
  Textbox :<br>
  <input type="text" name="textbox_name">
  <br>
  Checkbox:<br>
  <input type="checkbox" name="checkbox_name">
  <br>
  Radiobutton:<br>
  <input type="radio" name="rb_name" checked>
<br>
  DropDown:<br>
<select name="cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="fiat">Fiat</option>
    <option value="audi">Audi</option>
  </select>
<br><br>
<textarea name="message" rows="10" cols="30">
The cat was playing in the garden.
</textarea>
<br>
<button type="button">Button</button>
<br>
<br>
  <input type="submit" name="rb_name" checked>
</form>

</body>
</html>

Result :