COMP 1850 | HTML Forms | Input Element

The input element is the most flexible and versatile of the form controls.

Examine the source code of this document for more details.

Semantic, Accessible Inputs

All inputs must have either a placeholder or label to ensure maximum accessibility:

A form with inputs using labels

A form with inputs using placeholder attribute

Input Variations

A very versatile element, how an input works is determined by its type attribute.

Please fill out this form:

Checkboxes:

Which schools have you attended?

Radio Buttons:

Which gender do you identify as?