name: portada layout: true class: portada-slide, middle, right --- # HTML Forms ## Markup languages .footnote[Joan Puigcerver Ibáñez ([j.puigcerveribanez@edu.gva.es](mailto:j.puigcerveribanez@edu.gva.es))] --- layout: true class: regular-slide .right[.logo[]] --- # HTML Forms - .b[HTML] Forms are a HTML element used to ask the user information. - It is a wrapper for different input elements. - Data is sent to another page, that processes it. ```html
``` - `action`: Page that handles the data. - `method`: Type of the request sent to the page. (POST, GET) .center[] .center[[W3 Forms](https://www.w3schools.com/tags/tag_form.asp)] --- # Inputs: Text input - `type` attribute specifies the type of text input. .center[[W3 Input elements](https://www.w3schools.com/tags/tag_input.asp)] ```
text:
email:
password:
search:
tel:
``` --- # Inputs: Text input .center[[W3 Input elements](https://www.w3schools.com/tags/tag_input.asp)]
text:
email:
password:
search:
tel:
--- # Inputs: More Text input ```
url:
file:
hidden:
textarea:
<textarea id="textarea" name="user_message"></textarea>
``` --- # Inputs: More Text input
url:
file:
hidden:
textarea:
<textarea id="textarea" name="user_message"></textarea>
--- # Select ```
Banana
Cherry
Lemon
Banana
Cherry
Lemon
Carrot
Eggplant
Potato
```
Banana
Cherry
Lemon
Banana
Cherry
Lemon
Carrot
Eggplant
Potato
--- # Multiple Select ```
Banana
Cherry
Lemon
```
Banana
Cherry
Lemon
--- # Fieldset ```
Personal data
Name:
Surname:
```
Personal data
Name:
Surname:
--- # Radio buttons ```
Fruit juice size
Small
Medium
Large
```
Fruit juice size
Small
Medium
Large
--- # Buttons ```
Name:
Submit
```
Name:
Submit