# Form Basics — HTML

Source: https://www.geekswithgeeks.com/en/html/html-forms-basics

> The form tag, action and method attributes.

## The form tag

`action` is where the data is sent; `method` is how — `get` (in the URL) or `post` (in the request body).

```html
<form action="/submit" method="post">
  <input type="text" name="username">
  <button type="submit">Send</button>
</form>
```

## GET vs POST

Use `get` for searches/filters (visible, bookmarkable URL); use `post` for anything sensitive or that changes data.
