0
0
HTMLmarkup~5 mins

Form submission basics in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Aaction
Bmethod
Ctype
Dname
What does the method="POST" do in a form?
ASends data in the URL
BSends data inside the request body
CPrevents form submission
DChanges the form style
Which element creates a button that submits a form?
A<input type="button">
B<button type="reset">
C<input type="submit">
D<button>
Why should you use a <label> with form inputs?
ATo add color
BTo disable inputs
CTo make inputs bigger
DTo improve accessibility
What happens if a form has no action attribute?
AForm data is sent to the current page URL
BForm cannot be submitted
CForm data is sent to Google
DForm data is lost
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.