juniorHTML5

What are the new input types introduced in HTML5?

Updated Apr 28, 2026

Short answer

HTML5 introduced types like email, url, number, range, date, and color to improve validation and UX.

Deep explanation

These types provide built-in validation (e.g., checking for an '@' in email) and trigger specific keyboard layouts on mobile devices (e.g., a number pad for 'tel' or 'number').

Real-world example

Using type='tel' on a mobile login screen to automatically show the numeric keypad for the user.

Common mistakes

  • Relying purely on these for security
  • client-side validation can be bypassed, so server-side check is still required.

Follow-up questions

  • What happens if a browser doesn't support a new type?

More HTML5 interview questions

View all →