HTML Forms u0026 User Input Elements Quiz Quiz

  1. Choosing the Right Input Type

    Which input type should you use in HTML to let users pick a date from a calendar widget?

    1. type='date'
    2. type='datetime'
    3. type='calendar'
    4. type='textdate'
    5. type='datapicker'
  2. Understanding the u003Ctextareau003E Element

    What is the purpose of the u003Ctextareau003E element in an HTML form?

    1. To allow users to enter multi-line text
    2. To display a drop-down menu
    3. To submit a hidden value
    4. To let users pick a file
    5. To show a radio button
  3. Using the 'label' Tag Correctly

    Which is the correct way to associate a label with a corresponding input field in HTML?

    1. u003Clabel for='email'u003EEmail:u003C/labelu003Eu003Cinput id='email' type='email'u003E
    2. u003Clabel name='email'u003EEmail:u003C/labelu003Eu003Cinput type='email'u003E
    3. u003Clabel id='email'u003EEmail:u003C/labelu003Eu003Cinput type='email'u003E
    4. u003Clabel for='email'u003EEmail:u003C/lableu003Eu003Cinput id='email' type='email'u003E
    5. u003Clable for='email'u003EEmail:u003C/labelu003Eu003Cinput id='email' type='email'u003E
  4. Form Submission Buttons

    What is the correct type value to use on a button to submit a form when clicked?

    1. type='submit'
    2. type='save'
    3. type='sent'
    4. type='button'
    5. type='submitt'
  5. Grouping Options in a Drop-down

    Which HTML element is used to logically group related options inside a u003Cselectu003E drop-down list?

    1. u003Coptgroupu003E
    2. u003Coptiongroupu003E
    3. u003Cgroupu003E
    4. u003Cblocku003E
    5. u003Cgrouptagu003E
  6. Prefilling User Input Fields

    Which attribute is used to display default text inside an input text field before the user enters anything?

    1. placeholder
    2. valueholder
    3. description
    4. default
    5. hint
  7. Limiting Text Length in Input Fields

    How can you restrict the maximum number of characters a user can enter in an u003Cinput type='text'u003E field?

    1. maxlength
    2. maxchar
    3. limitlength
    4. charlimit
    5. max
  8. Radio Button Grouping

    When making a set of radio buttons, what must you do so that only one can be selected at a time?

    1. Give all radio buttons the same name attribute
    2. Place them inside a u003Cfieldsetu003E
    3. Use the same id for each radio button
    4. Use type='radiogroup'
    5. Write 'multiple' in the input tag
  9. Checkbox Use in Forms

    What is the main difference between checkboxes and radio buttons in HTML forms?

    1. Checkboxes allow multiple selections; radio buttons allow only one.
    2. Radio buttons are used for passwords.
    3. Checkboxes submit form data automatically.
    4. Radio buttons can display multi-line text.
    5. Checkboxes only work with u003Cform method='POST'u003E.
  10. Validating Required Fields

    Which attribute ensures that a user cannot submit an HTML form unless an input field is filled out?

    1. required
    2. mandatory
    3. mustfill
    4. obligatory
    5. need