Which attribute makes an HTML element directly editable by the user in the web browser?
contenteditable
hidden
draggable
tabindex
What is the primary purpose of the HTML5 <canvas> element?
To structure page layout and sections.
To display static vector graphics.
To embed pre-existing images.
To create interactive animations and graphics.
Which of the following file formats is NOT commonly supported by the <video> element?
WebM
Ogg
MP4
BMP
Which HTML5 input type is used to restrict user input to a valid email address?
email
text
url
mail
What attribute is used to define a regular expression that user input must match in a form field?
validate
pattern
match
regex
What does the 'srcset' attribute allow you to do with images in responsive web design?
Specify different image sources based on the user's internet speed.
Control the animation speed of animated GIFs.
Embed videos directly into the webpage.
Set the image as a background image for the webpage.
What HTML5 tag provides a predefined list of options for an input field, offering suggestions to the user as they type?
list
select
datalist
option
How do you store custom data associated with an HTML element, specifically for JavaScript access?
Utilizing data-* attributes
data-*
By embedding data directly within the element's content
Through the contenteditable attribute
Using the hidden attribute
What is the function of the 'controls' attribute within the <video> tag?
It displays playback controls for the user.
It automatically plays the video.
It specifies the video's source URL.
It loops the video continuously.
Which HTML tag is most appropriate for displaying a variable name within a code snippet?
<kbd>
<var>
<code>
<samp>