How do you store custom data associated with an HTML element, specifically for JavaScript access?
Using the hidden attribute
hidden
Utilizing data-* attributes
data-*
Through the contenteditable attribute
contenteditable
By embedding data directly within the element's content
Which global attribute indicates that an element can be dragged and dropped using JavaScript?
draggable
tabindex
Which HTML tag is most appropriate for displaying a variable name within a code snippet?
<kbd>
<code>
<samp>
<var>
What is the purpose of the 'data' attribute within the <object> tag?
Controls the display style of the object's border
Defines the source URL of the content to be embedded
Sets the height of the embedded object
Specifies the width of the embedded object
Which HTML5 element is used to represent a scalar measurement within a known range, often displayed as a progress bar?
progress
meter
range
datalist
What is the default behavior of a browser when encountering a newline character within a <pre> tag?
<pre>
The newline character creates a line break.
The newline character is replaced with a space.
The newline character is ignored.
The browser displays an error message.
How do Web Workers communicate with the main script?
Direct function calls
Message passing (events)
Shared memory access
WebSockets
What is the primary purpose of the class attribute in HTML?
class
Group multiple elements for styling and scripting
Define inline styles for an element
Specify the element's position in the document outline
Store temporary data for an element
What HTML5 tag provides a predefined list of options for an input field, offering suggestions to the user as they type?
select
option
list
Which attribute, when added to an input field, makes it mandatory for the user to fill out before submitting the form?
disabled
placeholder
required
readonly