2026
1. What is the Web Development Trifecta?
A: HTML5 (structure), CSS3 (presentation), and JavaScript (behavior).
2. What is the role of JavaScript in the trifecta?
A: It adds dynamic behavior and interactivity by manipulating the DOM,
responding to events, and fetching data asynchronously.
3. Why is the <!DOCTYPE html> declaration important?
A: It tells the browser to render the page in standards mode using
HTML5 parsing rules, avoiding quirks-mode inconsistencies.
4. Which HTML5 element defines independent, self-contained content?
A: <article> — it represents a self-contained composition such as a forum
post, magazine article, or blog entry.
5. Which element should contain hypertext menus for site navigation?
A: <nav> — it is specifically designed for navigation links.
6. When is an <aside> element appropriate?
A: For content tangentially related to the main content, such as sidebars,
pull quotes, advertising, or news feeds.
7. Which element represents the main content of a document and
cannot be a child of <header>, <nav>, <article>, <aside>, or <footer>?
A: <main>.
8. What is the purpose of the <section> element?
A: It groups related content together, typically with a heading.
9. Which element is used for a bulleted (unordered) list?
A: <ul> with nested <li> elements.
10.How is an ordered list created?
A: <ol> with nested <li> elements.
11.Which element defines a description list?
A: <dl> with <dt> (term) and <dd> (description).
,12.What does an HTML5 code validator confirm about code?
A: That it complies with an established standard (e.g., W3C
specifications), not that it is free of logic errors or browser-compatible.
13.Which attribute is used to play an audio file endlessly?
A: loop.
14.Which attribute displays an image inside a <video> element before
the video plays?
A: poster.
15.What video formats are commonly supported in HTML5?
A: MP4 (H.264), WebM, and Ogg.
16.What audio formats are commonly supported?
A: MP3, WAV, and Ogg.
17.Which HTML5 element provides fallback content for browsers that
do not support <video> or <audio>?
A: Text content placed between the opening and closing tags serves as
fallback.
18.What is the purpose of the <source> element inside <video> or
<audio>?
A: It specifies multiple media resources so the browser can choose a
supported format.
19.Which attribute makes a video start playing automatically?
A: autoplay (often combined with muted for browser policy compliance).
20.Which element is used to embed an external application or
interactive content?
A: <iframe> (or <embed>/<object> for older patterns).
21.What is the correct way to comment in HTML?
A: <!-- comment text -->.
22.What does the <figure> element represent?
A: Self-contained content such as an image, diagram, or code snippet,
often with a <figcaption>.
23.Which element defines a caption for a <figure>?
A: <figcaption>.
24.Which HTML5 input type is used for email addresses?
A: type="email".
, 25.Which input type provides a date picker?
A: type="date".
26.Which input type is used for a numeric range slider?
A: type="range".
27.Which input type validates a URL?
A: type="url".
28.What is the purpose of the required attribute?
A: It makes a form field mandatory before submission.
29.Which attribute provides a hint inside an input field?
A: placeholder.
30.Which element groups related form controls with a caption?
A: <fieldset> with a <legend>.
31.What is the purpose of the <label> element?
A: It associates a text label with a form control, improving accessibility.
32.How do you associate a <label> with an input?
A: Using the for attribute matching the input’s id.
33.Which HTML5 element defines a list of pre-defined options for an
input?
A: <datalist>.
34.Which element creates a dropdown list of options?
A: <select> with <option> elements.
35.What is the purpose of the <output> element?
A: It represents the result of a calculation or user action.
36.Which element is used for a multiline text input?
A: <textarea>.
37.What is the correct DOCTYPE for HTML5?
A: <!DOCTYPE html>.
38.Which element defines the root of an HTML document?
A: <html>.
39.Which element contains metadata about the document?
A: <head>.
40.Which element contains the visible page content?
A: <body>.