WGU D278 MIDTERM EXAM: WEB
DEVELOPMENT FOUNDATIONS
QUESTIONS WITH VERIFIED ANSWERS
2026/2027
1. In the context of the Critical Rendering Path, which process involves calculating the
position and size of all nodes in the render tree?
A. Painting
B. DOM Construction
C. Layout
D. CSSOM Construction
Answer: C
Conceptual Explanation: The Layout stage (also known as reflow) calculates the
geometry (position and dimensions) of every visible element in the render tree.
## 2. Which HTML5 element is specifically designed to provide a caption or legend for a
element?
A.
B.
,C.
D.
Answer: A
Conceptual Explanation: The
element represents a caption or legend for its parent
element.
3. When calculating CSS specificity, which of the following selectors has the highest weight?
A. A pseudo-class like :hover
B. A class selector like .nav-item
C. An attribute selector like [type=‘text’]
D. An ID selector like #header
Answer: D
Conceptual Explanation: ID selectors carry more weight (1,0,0) than class, attribute, or
pseudo-class selectors (0,1,0).
4. In the CSS Box Model, what is the area between the border and the content called?
A. Margin
B. Outline
C. Padding
, D. Gutter
Answer: C
Conceptual Explanation: Padding is the space inside the border, separating the content
from the border.
5. Which HTTP status code range indicates a client-side error, such as a missing page?
A. 2xx
B. 3xx
C. 5xx
D. 4xx
Answer: D
Conceptual Explanation: 4xx codes (like 404 Not Found) represent client-side errors,
while 5xx codes represent server-side errors.
6. Which CSS property is used to change the order of items in a Flexbox container without
changing the HTML source?
A. flex-index
B. z-index
C. flex-direction
D. order
DEVELOPMENT FOUNDATIONS
QUESTIONS WITH VERIFIED ANSWERS
2026/2027
1. In the context of the Critical Rendering Path, which process involves calculating the
position and size of all nodes in the render tree?
A. Painting
B. DOM Construction
C. Layout
D. CSSOM Construction
Answer: C
Conceptual Explanation: The Layout stage (also known as reflow) calculates the
geometry (position and dimensions) of every visible element in the render tree.
## 2. Which HTML5 element is specifically designed to provide a caption or legend for a
element?
A.
B.
,C.
D.
Answer: A
Conceptual Explanation: The
element represents a caption or legend for its parent
element.
3. When calculating CSS specificity, which of the following selectors has the highest weight?
A. A pseudo-class like :hover
B. A class selector like .nav-item
C. An attribute selector like [type=‘text’]
D. An ID selector like #header
Answer: D
Conceptual Explanation: ID selectors carry more weight (1,0,0) than class, attribute, or
pseudo-class selectors (0,1,0).
4. In the CSS Box Model, what is the area between the border and the content called?
A. Margin
B. Outline
C. Padding
, D. Gutter
Answer: C
Conceptual Explanation: Padding is the space inside the border, separating the content
from the border.
5. Which HTTP status code range indicates a client-side error, such as a missing page?
A. 2xx
B. 3xx
C. 5xx
D. 4xx
Answer: D
Conceptual Explanation: 4xx codes (like 404 Not Found) represent client-side errors,
while 5xx codes represent server-side errors.
6. Which CSS property is used to change the order of items in a Flexbox container without
changing the HTML source?
A. flex-index
B. z-index
C. flex-direction
D. order