HTML Form Basics
Forms are used to collect input from users. The <form> element wraps all form controls.
Key Attributes
action— URL to send form data tomethod— HTTP method:get(data in URL) orpost(data in body)
The <label> Element
Labels are linked to inputs via the for attribute matching the input's id. This improves accessibility — clicking the label focuses the input.
The <input> Element
The most versatile form element. Its behaviour depends on the type attribute.