Quiz about HTML Form

HTML Form

Last Updated :
Discuss
Comments

Question 1

Which input type allows users to select one option only from multiple choices?

  • A

    checkbox

  • B

    text

  • C

    submit

  • D

    radio

Question 2

What does the enctype="multipart/form-data" attribute do in a form Tag?

  • A

    Sends data as plain text

  • B

    Supports file upload data

  • C

    Encodes data for requests

  • D

    Performs form validation

Question 3

What is the primary purpose of the label tag in HTML?

  • A

    To style text as bold

  • B

    To provide a caption for form inputs and improve accessibility

  • C

    To add images to forms

  • D

    To validate input data

Question 4

Where is the default text placed in a textarea element?

  • A

    In the placeholder attribute only

  • B

    Between the opening and closing <textarea> tags

  • C

    In the value attribute

  • D

    In the name attribute

Question 5

Which HTML element attribute value should the form attribute of fieldset match?

  • A

    The name of a <fieldset>

  • B

    The class of the <form>

  • C

    The id of the <form>

  • D

    The method of the <form>

Question 6

Which attribute is required on datalist to link it to an input?

  • A

    name

  • B

    id

  • C

    value

  • D

    type

Question 7

Which key difference distinguishes the <button> tag from <input type="button"> in terms of content handling?

  • A

    <input> supports child elements

  • B

    <input> supports nested content

  • C

    <button> supports nested content

  • D

    <button> supports text only

Question 8

Which attribute ensures that a user must select a value from a <select> dropdown before form submission?

  • A

    autofocus

  • B

    multiple

  • C

    disabled

  • D

    required

Question 9

In a dropdown with a placeholder option, which combination correctly defines a non-selectable default option?

  • A

    value="none" required selected

  • B

    value="" multiple selected

  • C

    value="" disabled selected

  • D

    value="default" selected

Question 10

Which attribute ensures that an input field's value is included when form data is submitted to the server?

  • A

    target

  • B

    name

  • C

    method

  • D

    id

There are 15 questions to complete.

Take a part in the ongoing discussion