Thuta Learning
IntermediateWeb Developmentbeginner

Form Element

Relax. We'll talk through this in plain words — no textbook voice.

Forms are used to collect user input. Login, contact, checkout, search box — most places where users "talk" to a website are forms.

action is the URL data gets sent to on submit, and method is how it gets sent. GET tends to carry the data right in the URL, while POST is the most commonly used for sending form data.

html
<form action="/submit" method="post">
  <label for="name">Your name</label>
  <input type="text" id="name" name="name">
  <button type="submit">Send</button>
</form>
You should see
You'll see a form where you can enter a name and submit it.
Form Element | Thuta Learning