Skip to main content
InterviewHubPRO
Section Overview
Q6

Question 6 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

12%
HTML5 & Web APIs (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What are the modern `<input>` types and native validation attributes?

junior LevelForms

In Simple Words: HTML5 introduced specialized input types that provide native mobile keyboard layouts and browser validation:

  • Types: email, tel (opens number pad on phones), url, number, date, color, file, range.
  • Native Validation Attributes:
    • required: Field must not be empty.
    • minlength & maxlength: String length constraints.
    • min & max: Numeric or date boundaries.
    • pattern="[A-Z]{3}-[0-9]{4}": Regex validation pattern.
    • Browser automatically blocks form submission and displays native localized tooltip errors if inputs violate these constraints!