← HTML/CSS EnglishChapter 03 of 13

Forms and Input Elements

## Learning Objectives - Create HTML forms - Understand form attributes and actions - Work with various input types - Create accessible forms ## Basic Form Structure ```html
``` ## Form Attributes ### action Specifies where to send form data: ```html
``` ### method HTTP method to use: ```html ``` - `GET` - appends data to URL (default, for bookmarks) - `POST` - sends data in request body (for sensitive data) ### name ```html ``` ## Input Element ### Text Input ```html ``` ### Password Input ```html ``` ### Email Input ```html ``` ### Number Input ```html ``` ### Telephone Input ```html ``` ### URL Input ```html ``` ## Textarea ```html ``` ## Select Dropdown ```html ``` ### Grouped Options ```html ``` ## Checkboxes ```html
Interests:
``` ## Radio Buttons ```html
Preferred Contact:
``` ## Hidden Input ```html ``` ## File Input ```html ``` ### Multiple Files ```html ``` ## Range Slider ```html ``` ## Color Picker ```html ``` ## Date and Time Inputs ### Date ```html ``` ### Time ```html ``` ### DateTime Local ```html ``` ### Month and Week ```html ``` ## Input Attributes ### required ```html ``` ### disabled ```html ``` ### readonly ```html ``` ### placeholder ```html ``` ### autocomplete ```html ``` ## Labels and Accessibility ```html ``` ## Fieldset and Legend ```html
Shipping Address
``` ## Button Types ```html ``` ## Summary - Use `` with `action` and `method` attributes - Use `