0
0
HTMLmarkup~15 mins

Purpose of forms in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Form Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
What is the main purpose of an HTML form?
Choose the best description of what an HTML form does on a webpage.
AIt styles the webpage with colors and fonts.
BIt collects user input and sends it to a server for processing.
CIt creates links to other pages on the website.
DIt displays images and videos to the user.
Attempts:
2 left
💡 Hint
Think about what happens when you fill out a survey or login page.
📝 Syntax
intermediate
1:00remaining
Which HTML element is used to create a form?
Select the correct HTML tag that starts a form.
A<section>
B<input>
C<button>
D<form>
Attempts:
2 left
💡 Hint
The tag that wraps all form controls is the form tag.
rendering
advanced
1:30remaining
What will the user see when this form is rendered?
Look at the HTML code below and choose what the user will see in the browser.
HTML
<form>
  <label for="name">Name:</label>
  <input type="text" id="name" name="name">
  <button type="submit">Send</button>
</form>
AA text box labeled 'Name:' and a button labeled 'Send'.
BOnly a button labeled 'Send'.
CA text box without any label and a button labeled 'Send'.
DA label 'Name:' with no input box or button.
Attempts:
2 left
💡 Hint
Labels describe inputs; buttons submit the form.
accessibility
advanced
1:30remaining
Why is the
Choose the best reason why using
AIt automatically submits the form when clicked.
BIt changes the color of the input box to make it visible.
CIt links the text to the input so screen readers can identify the input purpose.
DIt hides the input from users who do not need it.
Attempts:
2 left
💡 Hint
Think about users who rely on screen readers.
🧠 Conceptual
expert
2:00remaining
What happens if a form has no action attribute?
Select what the browser does when a form without an action attribute is submitted.
AThe form data is sent to the same page URL that the form is on.
BThe form data is sent to a default server URL automatically.
CThe form submission is blocked and shows an error.
DThe form data is sent to a blank page.
Attempts:
2 left
💡 Hint
Think about what happens when no destination is specified for the form data.