Which HTML5 input type is used to restrict user input to a valid email address?
mail
email
text
url
What HTML5 input type allows the user to select a color and provides a visual color picker?
range
color
hue
What HTML5 tag provides a predefined list of options for an input field, offering suggestions to the user as they type?
datalist
list
select
option
What is the primary purpose of Web Workers in HTML5?
To manage network requests
To handle user input events
To perform CPU-intensive tasks in the background
To manipulate the DOM directly
What is the primary purpose of the <pre> tag in HTML?
<pre>
To display text in a bold and italicized format.
To preserve whitespace and line breaks exactly as typed.
To display large font sizes for headings.
To create a new paragraph with indented text.
What attribute is used to define a regular expression that user input must match in a form field?
regex
match
validate
pattern
How is data stored in localStorage?
As arrays only
As strings, but can represent other data types
As strings only
As JSON objects only
What is the primary purpose of the viewport meta tag in responsive web design?
It links the HTML document to an external stylesheet.
It specifies the character encoding for the HTML document.
It embeds JavaScript code into the HTML document.
It defines the area of the webpage visible to the user.
Which tag would you use to mark up the output of a command-line program in HTML?
<samp>
<kbd>
<code>
What does SVG stand for in the context of web development?
Scalable Vector Graphics
Standard Vector Graphics
Static Vector Graphics
Simple Visual Graphics