Lancecourse
Courses
How-tos
Blog
Sign In
Sign Up
free
Francais
Forms and Input Controls
This quiz focused on HTML forms and controls and was designed to test your understanding of the concepts and attributes involved.
Question 1
Which HTML element is used to create a form?
<input>
<form>
<fieldset>
<label>
Question 2
How can you ensure that a form field is required and cannot be left empty?
Using the `required` attribute
Using the readonly attribute
Using the disabled attribute
sing the maxlength attribute
Question 3
What attribute can be used with the <textarea> element to set the number of visible rows?
size
length
rows
height
Question 4
Which input type would you use to accept a date from the user?
text
date
datetime
time
Question 5
Which input type should you use to create a password field where the text is hidden?
text
password
hidden
secure
Question 6
Which input type allows users to select one option from a list of predefined options?
checkbox
radio
text
select
Question 7
What is the purpose of the action attribute in a form?
It specifies the HTTP method to use when sending form data
It defines where to send the form data when the form is submitted
It sets the default value of the form.
It specifies the encoding type of the form data.
Question 8
How can you ensure that a phone number input only accepts digits and has a specific format?
Use the type="tel" and pattern attributes.
Use the type="number" and pattern attributes.
Use the type="text" and maxlength attributes.
Use the type="text" and pattern attributes.
Question 9
Which HTML element can be used to group related form controls together?
<section>
<group>
<fieldset>
<div>
Question 10
What attribute of the <input> element specifies the type of input control?
type
name
value
id
Answer all the questions then submit.
Submit Answers