Mixed Deck — All HTML5 Topics Flashcards
100 cards from real HTML5 practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 20 Mixed Deck — All HTML5 Topics flashcards as text
What HTML5 element is used to provide text tracks (subtitles or captions) for a video?
Answer:
The element specifies timed text tracks (subtitles, captions, chapters) for media elements in WebVTT format.
Which attribute on the element makes the video start playing automatically when the page loads?
Answer: autoplay
The autoplay attribute causes the video to begin playing as soon as it is ready, though browsers often require muted to be set as well.
What is a Shared Worker in HTML5, and how does it differ from a Dedicated Worker?
Answer: A Shared Worker can be accessed by multiple scripts from different windows or tabs of the same origin
Unlike a Dedicated Worker that is tied to one script, a Shared Worker can be shared across multiple browsing contexts (tabs, iframes) from the same origin.
Which HTML5 API allows a web page to request full-screen mode for an element?
Answer: Fullscreen API
The Fullscreen API provides methods like requestFullscreen() to display a specific element in full-screen mode.
Which of the following best distinguishes from ?
Answer: is self-contained and independently distributable; is a thematic grouping
holds content that makes sense on its own (like a blog post), while groups related content under a theme within a larger document.
Which of the following statements regarding HTML5's Web form 2.0 is correct?
Answer: All of the above
The correct answer: All of the above
Which Web Worker type is specifically designed to act as a network proxy and enable offline capabilities?
Answer: Service Worker
Service Workers act as a proxy between the browser and network, enabling features like offline caching, push notifications, and background sync.
In HTML5, what do you use instead of cookies?
Answer: Local Storage
Explanation: Many usage of cookies were superseded by the use of LocalStorage after HTML5 was released. This is due to the several advantages that LocalStorage provides over cookies. One of the most significant distinctions is that, unlike cookies, data is not need to be transferred back and forth with each HTTP request.
What does the 'preload' attribute on an HTML5 element hint to the browser?
Answer: How much media data to load before the user starts playing
The preload attribute with values 'none', 'metadata', or 'auto' hints to the browser how much of the media to preload before the user presses play.
The canvas rotate() method rotates the canvas by:
Answer: An angle specified in radians
The rotate(angle) method rotates the canvas transformation matrix by the given angle measured in radians.
What does the CSS 'aspect-ratio' property control?
Answer: The preferred aspect ratio of an element's box
The aspect-ratio property sets the preferred aspect ratio of an element, maintaining proportional dimensions as the element resizes.
The element______ simply combines elements within an enclosing dd tag, though it may also correlate them with a caption defined by a dt tag.
Answer: object
Explanation: Although it may associate things with a caption provided by a dt tag, the element object simply groups items within an enclosing dd tag.
Inside a Web Worker, which global object is available instead of 'window'?
Answer: self
Inside a Web Worker, 'self' refers to the worker's global scope (DedicatedWorkerGlobalScope), since 'window' is not available.
The 'formaction' attribute on a submit button in HTML5 allows you to:
Answer: Override the form's action URL for that specific button
The formaction attribute on a submit button specifies the URL to which the form data is sent, overriding the parent action attribute.
Which CSS Grid property defines the number and size of columns in a grid container?
Answer: grid-template-columns
The grid-template-columns property defines the column track sizes of a CSS Grid layout using values like fr units, px, or repeat().
Which element represents content that is tangentially related to the main content, such as a sidebar?
Answer:
The element holds content related to the surrounding content but considered separate, like a sidebar or pull quote.
What is the CSS position property's default value?
Answer: static
Explanation: If no explicit position is supplied for any html element, the default position is static. No matter whatever tag, the default value for the CSS property position is static.
Which CSS3 feature, commonly used with HTML5, allows applying different styles based on screen width?
Answer: Media queries
CSS media queries use @media rules to apply styles conditionally based on device characteristics like screen width, enabling responsive layouts.
What does the canvas save() method do?
Answer: Saves the entire state of the canvas context to a stack
The save() method pushes the current canvas state (transforms, styles, clipping) onto a stack so it can be restored later with restore().
Which HTML5 input type is used to let users select a date from a date picker?
Answer: date
The input type='date' provides a native browser date picker control for selecting year, month, and day.