Lancecourse
Les Cours
Les Tutos
Blog
Se Connecter
S'inscrire
gratis
English
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
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 2
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 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 allows users to select one option from a list of predefined options?
checkbox
radio
text
select
Question 5
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 6
Which input type would you use to accept a date from the user?
text
date
datetime
time
Question 7
Which HTML element can be used to group related form controls together?
<section>
<group>
<fieldset>
<div>
Question 8
Which HTML element is used to create a form?
<input>
<form>
<fieldset>
<label>
Question 9
Which input type should you use to create a password field where the text is hidden?
text
password
hidden
secure
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