Recall & Review
beginner
What is the purpose of the <form> element in HTML?
The <form> element groups input fields and controls to collect user data and send it to a server when submitted.
Click to reveal answer
beginner
What attribute of the <form> element specifies where the form data is sent?
The
action attribute defines the URL where the form data will be sent after submission.Click to reveal answer
beginner
What does the
method attribute of the <form> element do?The
method attribute specifies how to send form data: GET appends data to the URL, POST sends data inside the request body.Click to reveal answer
beginner
What happens when a user clicks a submit button inside a form?
Clicking a submit button sends the form data to the URL in the
action attribute using the specified method. The browser then loads the response page.Click to reveal answer
beginner
Why is it important to use labels with form inputs?
Labels improve accessibility by linking text descriptions to inputs, helping screen readers and making the form easier to use.
Click to reveal answer
Which attribute in a form specifies the URL to send data to?
✗ Incorrect
The
action attribute tells the browser where to send the form data.What does the
method="POST" do in a form?✗ Incorrect
POST sends form data inside the request body, keeping it hidden from the URL.
Which element creates a button that submits a form?
✗ Incorrect
creates a button that sends the form data when clicked.
Why should you use a <label> with form inputs?
✗ Incorrect
Labels help screen readers and users understand what each input is for.
What happens if a form has no
action attribute?✗ Incorrect
Without an action, the form submits to the same page URL by default.
Explain how a basic HTML form sends data to a server.
Think about what happens when you fill a form and press submit.
You got /5 concepts.
Describe why accessibility is important in form design and how labels help.
Imagine someone who cannot see well using your form.
You got /4 concepts.