Module 07 of 11

Forms & Inputs

Lessons

About This Module

Forms are how a web page stops being a document and starts being an application: sign-ups, searches, checkouts and comments all depend on them. A good form is more than a row of boxes. It has clear labels, the right control for each kind of answer, sensible checks on what gets entered, and a defined way of sending the result to a server.

This module starts with building a form from the form, label, input and button elements, including the structure and accessibility habits that make it usable. It then tours the input types and controls: text fields, passwords, textareas, checkboxes, radio buttons and select menus. Next you'll use built-in validation attributes such as required, minlength and pattern, and finish with how forms submit data using the action and method attributes, including the difference between GET and POST.

Watch the lessons in order, then continue on to Accessibility.

Lessons

4 videos
01

How to Build a Form with HTML

Builds an HTML form with labels, inputs, buttons and more, with attention to semantic structure and accessibility best practices.

02

HTML Forms in 30 Minutes

A longer walkthrough of the form tag and the main controls: labels, text and password inputs, textareas, checkboxes, radio buttons and select dropdowns.

03

HTML5 Form Validation Attributes

Covers the HTML5 validation attributes, including min, max, minlength, maxlength, pattern and required, that let the browser check input for you.

04

Difference Between GET and POST in an HTML Form

Explains what the GET and POST methods are and how each one sends form data from the browser to a server.