Form Elements and Controls

Building blocks of interactive web forms

code The <form> Element
<form action="/submit" method="post">
check_circle
Container for form controls
check_circle
Defines action (URL) and method (GET/POST)
label The <label> Element
<label for="name">Name:</label>
check_circle
Improves accessibility
check_circle
Makes form controls clickable
text_fields Text Input Fields
<input type="text" name="username">
check_circle
Single line: <input type="text">
check_circle
Password: <input type="password">
check_circle
Multiple line: <textarea></textarea>
HTML form elements example