NEW
Font size
WorksheetsHTML and CSS Mastery
Total questions: 30
Worksheet time: 15mins
What is the purpose of semantic elements in HTML?
To create interactive elements with JavaScript
To style the content with CSS
To define the layout of the webpage
The purpose of semantic elements in HTML is to give meaning to the content, enhancing accessibility and search engine optimization.
Which HTML element is used to define navigation links?
What does the
The
The
The
The
Which element is used to create a footer in HTML?
What is the role of the
The
The
The
The
How do you create a form in HTML?
HTML does not support forms at all.
Use the
Use the tag alone to create a form in HTML.
Forms can only be created using JavaScript.
What attribute is used to specify the action of a form?
enctype
action
target
method
Which input type is used for entering a password?
number
password
text
What is the purpose of the
To specify the data type of the input fields.
To define the layout of the form elements.
To improve accessibility and usability by associating a label with a form input.
To create a visual style for the form inputs.
How can you create a dropdown list in HTML?
Use
Use
Implement a tag with
Utilize
What attribute is used to make an input field required?
optional
default
nullable
required
Which element is used to group related form controls?
fieldset
article
section
div
What is the difference between and ?
is used for numeric input only.
Both inputs require the same validation rules.
The main difference is that validates the input as an email address, while does not.
can accept any text input.
How do you create a checkbox input in HTML?
What is the purpose of the
To validate form inputs before submission.
To style the form elements with CSS.
To create a new form element type.
To group related form elements for better organization and accessibility.
What is the function of the
The
The
The
The
Which attribute is used to specify the method of form submission?
type
action
method
submit
How can you create a checkbox in HTML?
Use
Use to create a checkbox.
Implement a tag with
Utilize
What is the purpose of the element?
To create a text input field.
To allow users to select multiple options at once.
To display images in a form.
To enable users to select a single option from a set of choices.
Which element is used to create a button in HTML forms?
submit
button
input type='button'
Both
button
andinput type='button'
are correct.What does the
It is used for single-line text input only.
It allows users to enter multiple lines of text.
It is used to display images in a form.
It creates a dropdown list for selection.
What is the purpose of the element in a form?
To allow users to upload files from their device.
To enable users to select a color.
To create a text input field.
To display images in a form.
How can you specify a default value for an input field in HTML?
It is not possible to set a default value.
Set the default value in JavaScript only.
Use the
Use the
What does the
It is used to create a dropdown list.
It represents the progress of a task.
It is used for text input only.
It is for displaying images.
What is the purpose of the element in a form?
To create a dropdown list.
To allow users to upload files.
To create a visible input field for user interaction.
To display a hidden field that users cannot see or interact with.
How can you create a reset button in an HTML form?
Use with JavaScript to reset the form.
Use
Use
Use to create a reset button.
What does the
It makes the label mandatory for form submission.
It sets the default value for the input field.
It defines the style of the label.
It specifies the input field that the label is associated with.
What is the purpose of the element in a form?
To create a text input field for any date format.
To input a time value only.
To allow users to select a date from a calendar.
To display a date in a non-editable format.
How can you ensure that an input field only accepts numeric values?
Use to restrict input to numeric values.
Use with a pattern attribute.
Use to enforce numeric input.
It is not possible to restrict input to numeric values.
What does the element allow users to do?
To upload files from their device.
To select multiple options from a set.
To input a single line of text.
To create a dropdown list for selection.
