What HTML5 input type allows the user to select a color and provides a visual color picker?
color
range
text
hue
What is a key difference between using <iframe> and <object> for embedding content?
What is the function of the 'controls' attribute within the <video> tag?
It automatically plays the video.
It specifies the video's source URL.
It loops the video continuously.
It displays playback controls for the user.
What is the default behavior of a browser when encountering a newline character within a <pre> tag?
<pre>
The newline character is replaced with a space.
The newline character creates a line break.
The browser displays an error message.
The newline character is ignored.
Which global attribute is used to uniquely identify an HTML element within a document?
id
class
contenteditable
data-*
What is the primary purpose of the class attribute in HTML?
Specify the element's position in the document outline
Group multiple elements for styling and scripting
Store temporary data for an element
Define inline styles for an element
Which attribute within the viewport meta tag is used to set the initial zoom level of the webpage?
user-scalable
height
width
initial-scale
What does the 'srcset' attribute allow you to do with images in responsive web design?
Set the image as a background image for the webpage.
Embed videos directly into the webpage.
Control the animation speed of animated GIFs.
Specify different image sources based on the user's internet speed.
How does the <kbd> tag differ from the <code> tag in HTML?
<kbd>
<code>
<kbd> is for generic code snippets, while <code> represents user input.
<kbd> and <code> are interchangeable; there is no practical difference.
<kbd> displays text in a fixed-width font, while <code> uses a proportional font.
<kbd> is used for keyboard input, while <code> is for displaying programming code.
What is the purpose of the <figcaption> element in HTML5?
To provide a caption for a figure.
To define a table caption.
To insert a figure from an external source.
To create a figure inside an image.