Input types
The <input> attribute that specifies what kind of data field is created. Different values produce text boxes, password fields, number steppers, checkboxes, and more.
Understanding Input types in HTML & CSS
What it does: type="email" tells the browser to validate the format as an email address. Changing the type value changes the entire field behaviour. type="number" adds a numeric stepper to the field and rejects non-numeric input on submission. type="password" hides the characters for security. 'secret' is not a valid input type. type="checkbox" renders a tick-box. When checked and submitted, the name/value pair is included in the form data. The correct type for phone number inputs is tel, not telephone. Using an invalid type causes the browser to fall back to type="text".
Common mistakes: The type value must be lowercase. 'Email' should be written as 'email': type="email". The type attribute value is missing its closing double quote. It should be type="number" min="1" max="10".
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 21–30) and word search (Modules 21–41).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
typeFill in the Blanks
Spot the Error
Student with a class code? Join your class →