QuizzesForms — Labels, Input Types and Autofill — Concept Check
intermediate
html-css

Forms — Labels, Input Types and Autofill — Concept Check

Questions on Forms — Labels, Input Types and Autofill. The right input type gives a phone the right keyboard, the right autocomplete lets a browser fill a form in one tap, and a real label makes the field usable at all.

7 minutes 7 questions Pass at 70%
Time Limit
7 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

7 questions on Forms — Labels, Input Types and Autofill — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer uses a placeholder instead of a label for an email input field. What issue might this cause?

    • AThe placeholder allows for autofill, while a label does not.
    • BThe placeholder automatically validates the email format.
    • CThe placeholder provides better contrast than a label, improving accessibility.
    • DThe placeholder disappears when typing starts, making it unclear what to enter.
  2. 2.What is a potential issue of using <input type='number'> for a phone number field?

    • AIt validates the phone number format automatically.
    • BIt provides a numeric keypad, which is ideal for phone numbers.
    • CIt automatically formats the phone number correctly.
    • DIt strips leading zeros and allows non-numeric characters like 'e'.
  3. 3.A form has an <input type='password'> field with autocomplete='off'. What is a likely consequence?

    • AThe browser will ignore this setting and autofill anyway.
    • BThe field will automatically fill with a default password.
    • CThe password manager may not offer to save or fill the password.
    • DThe field will be more secure against autofill attacks.
  4. 4.Which input type should be used for a field that requires a date selection?

    • A<input type='number'>
    • B<input type='tel'>
    • C<input type='date'>
    • D<input type='text'>
  5. 5.A developer wants to ensure a mobile user gets a numeric keypad for a one-time code input. Which attribute combination is correct?

    • A<input type='text' inputmode='numeric' autocomplete='one-time-code'>
    • B<input type='number' autocomplete='one-time-code'>
    • C<input type='tel' autocomplete='one-time-code'>
    • D<input type='password' inputmode='numeric'>
  6. 6.What is the purpose of the 'aria-describedby' attribute in form inputs?

    • AIt validates the input content against described rules.
    • BIt styles the input based on described attributes.
    • CIt automatically fills the input with described content.
    • DIt links help text and error messages to the input for screen readers.
  7. 7.Which attribute is crucial for reducing form completion time by enabling autofill?

    • Ainputmode
    • Bpattern
    • Caria-describedby
    • Dautocomplete