Which HTML5 input type is used to restrict user input to a valid email address?
email
text
url
mail
Which attribute, when added to an input field, makes it mandatory for the user to fill out before submitting the form?
disabled
required
placeholder
readonly
What is the primary purpose of the viewport meta tag in responsive web design?
It specifies the character encoding for the HTML document.
It defines the area of the webpage visible to the user.
It embeds JavaScript code into the HTML document.
It links the HTML document to an external stylesheet.
How can you provide alternative content to be displayed if the browser doesn't support the embedded content within an <object> tag?
By placing the alternative content inside the opening and closing <object> tags
By using a separate <div> element with a specific ID
By including a comment tag with the alternative content
By using the 'alt' attribute within the <object> tag
What does the 'srcset' attribute allow you to do with images in responsive web design?
Control the animation speed of animated GIFs.
Set the image as a background image for the webpage.
Specify different image sources based on the user's internet speed.
Embed videos directly into the webpage.
What is the purpose of the <figcaption> element in HTML5?
To insert a figure from an external source.
To provide a caption for a figure.
To define a table caption.
To create a figure inside an image.
Can you nest a <blockquote> element within another <blockquote> element in HTML?
<blockquote>
It depends on the browser's interpretation of nested blockquotes.
Yes, it will create visually nested quotations.
No, nested blockquotes are not allowed in HTML.
Yes, but both blockquotes will have the same indentation level.
What is a key difference between using <iframe> and <object> for embedding content?
What is the primary purpose of the class attribute in HTML?
class
Group multiple elements for styling and scripting
Store temporary data for an element
Specify the element's position in the document outline
Define inline styles for an element
How do you store custom data associated with an HTML element, specifically for JavaScript access?
Through the contenteditable attribute
contenteditable
Using the hidden attribute
hidden
Utilizing data-* attributes
data-*
By embedding data directly within the element's content