Skip to content

Latest commit

 

History

History
179 lines (146 loc) · 8.78 KB

QUIZZES.md

File metadata and controls

179 lines (146 loc) · 8.78 KB

Phase review questions

Answer each phase's questions before reading its answer key. If an answer is difficult, return to the matching lesson and change its example until you can explain the result.

Phase 1: HTML foundations

  1. What is the difference between View Source and the live Elements panel?
  2. Where does the browser look for a relative URL such as images/photo.svg?
  3. What belongs in head, and what belongs in body?
  4. Why should heading levels follow the content outline rather than font size?
  5. When should you use a link instead of a button?
  6. When should an image have empty alt text?
  7. Which list type represents steps whose order matters?
  8. When is article more appropriate than a plain div?

Phase 1 answers

  1. View Source shows the original HTML response; Elements shows the current parsed document, which can change.
  2. It resolves relative to the current document URL unless another base URL is defined.
  3. Head holds metadata and resource links; body holds rendered document content.
  4. Headings communicate hierarchy to readers and assistive technology; CSS controls their size.
  5. Use a link to navigate to a URL or fragment; use a button to perform an action.
  6. Use empty alt for a purely decorative image that adds no information.
  7. An ordered list, ol.
  8. Use article for content that could stand on its own, such as a post or independent card.

Phase 2: HTML content and interaction

  1. What connects a data cell to a straightforward row or column header?
  2. What do id and name each do for a form input?
  3. Why must radio buttons in one choice group share a name?
  4. Why is browser validation insufficient for a real server?
  5. What text alternatives might a spoken video need?
  6. Which native HTML pair creates a no-script disclosure?
  7. Why should page titles be unique?
  8. Why is zero validator errors not proof of a usable page?

Phase 2 answers

  1. A th cell with an appropriate scope value, plus clear table structure.
  2. id connects labels and references to the control; name is the submitted key.
  3. A shared name makes them one mutually exclusive group.
  4. Requests can bypass browser checks; the server must validate what it receives.
  5. Captions for speech and important sound, and a transcript or equivalent text where needed.
  6. details and summary.
  7. They identify each page in tabs, history, search results, and link sharing.
  8. Validation checks syntax and some structure, not every semantic or usability decision.

Phase 3: CSS foundations

  1. What happens when a browser does not understand one CSS declaration?
  2. Which selector is reusable across many elements: class or ID?
  3. Where can you see which of two competing declarations wins?
  4. How do rem and em differ?
  5. Why check contrast after adding transparency?
  6. Why avoid a fixed height for a text card?
  7. What is included in width under border-box sizing?
  8. How does display:none differ from visibility:hidden?

Phase 3 answers

  1. It ignores that declaration and continues parsing other valid CSS.
  2. A class.
  3. In developer tools, inspect Styles and Computed values.
  4. rem refers to the root font size; em uses the element's font size for most properties, but the parent's font size when setting font-size itself.
  5. The underlying surface changes the final visible colors and contrast.
  6. Longer, translated, or zoomed text may overflow or be clipped.
  7. Content, padding, and border fit within the declared width.
  8. display:none removes layout space; visibility:hidden hides the element while retaining its space.

Phase 4: Layout and responsive design

  1. What usually establishes the containing block for an absolutely positioned badge?
  2. Which Flexbox property puts items on additional lines?
  3. When is Grid a better starting point than Flexbox?
  4. How should you choose a responsive breakpoint?
  5. What does a container query measure?
  6. What does clamp do?
  7. What is the difference between srcset and object-fit?
  8. Why should the narrow-screen content order be designed early?

Phase 4 answers

  1. A positioned ancestor, commonly the card with position:relative.
  2. flex-wrap.
  3. When rows and columns need coordinated alignment.
  4. At a width where the content or layout begins to fail.
  5. A defined ancestor query container, rather than the viewport.
  6. It bounds a preferred value between a minimum and maximum.
  7. srcset offers resource candidates; object-fit controls how an already chosen image fills its box.
  8. Source order and readability should work before wider visual arrangements are added.

Phase 5: Accessible and polished interfaces

  1. Why does automated accessibility testing need manual checks?
  2. Which CSS state is useful for a keyboard-specific focus indicator?
  3. What names a group of related form controls?
  4. Why should a placeholder not replace a label?
  5. What should happen if a web font fails to load?
  6. Why can opacity on a whole card be a problem?
  7. What should reduced-motion preferences change?
  8. What is one useful change for a print stylesheet?

Phase 5 answers

  1. Tools cannot judge every task, reading order, wording, or interaction experience.
  2. :focus-visible.
  3. fieldset with legend.
  4. The placeholder can disappear and may not provide a persistent accessible name.
  5. A readable fallback font should render the content.
  6. It also fades the text, which can reduce readability.
  7. Remove or simplify nonessential animation while keeping state changes understandable.
  8. Remove navigation, expose useful link URLs, or prevent poor page breaks.

Phase 6: Advanced CSS mechanics

  1. Where can a theme override a shared custom property?
  2. Why use cascade layers in a large stylesheet?
  3. What does :has() let a selector express?
  4. What problem does subgrid solve for repeated cards?
  5. What does inline-start mean in a right-to-left writing direction?
  6. What makes a component selector fragile?
  7. Why keep a base declaration before an @supports enhancement?
  8. What must work before a progressive enhancement activates?

Phase 6 answers

  1. On a theme wrapper or another appropriate ancestor in the cascade.
  2. They give explicit priority groups and reduce specificity conflicts.
  3. A match based on a descendant or related element's presence or state.
  4. It aligns nested rows or columns to tracks shared with the parent grid.
  5. The start of the inline direction, typically the right side for right-to-left horizontal text.
  6. Depending on deep page structure or unrelated ancestor classes.
  7. The base remains usable where the enhancement is not applied.
  8. The core content, order, and basic interaction.

Phase 7: Professional workflow

  1. Which developer-tools views explain a too-wide card?
  2. Why test in more than one browser engine?
  3. Why include image width and height in HTML?
  4. Can metadata replace clear visible content?
  5. Does styling an iframe change whether its content is trusted?
  6. What should a component document besides its default appearance?
  7. What makes a code-review comment useful?
  8. What should you check after a successful push and deployment?

Phase 7 answers

  1. Computed styles and the box model, followed by the relevant style rules.
  2. Defaults, feature behavior, and rendering can differ between engines.
  3. They reserve space and help prevent layout movement while loading.
  4. No; visible content and structure remain the main source of meaning.
  5. No; trust and capabilities need separate controls and review.
  6. Purpose, variants, interaction states, markup, and accessibility behavior.
  7. A specific issue, its effect, and a testable proposed fix.
  8. Public links, assets, forms, keyboard behavior, and responsive layout.

Phase 8: Senior practice and capstones

  1. Why is absolute positioning a weak method for reproducing an entire design?
  2. Which content states should be used to stress-test a card?
  3. Does a button's visual style decide whether it should be an a or button element?
  4. What should an accessibility finding record?
  5. What makes a performance comparison meaningful?
  6. How do you reduce risk during a CSS refactor?
  7. What pages and evidence should the capstone include?
  8. What should a case study say about limitations?

Phase 8 answers

  1. It often breaks when content length, viewport size, or zoom changes.
  2. Long titles, missing images, extra text, translated-like wording, and narrow widths.
  3. No. Navigation uses a link; an action uses a button.
  4. Location, user impact, reproduction steps, fix, and retest result.
  5. Comparable conditions, a relevant metric, and a clear before-and-after change.
  6. Refactor in small steps and compare appearance and behavior after each step.
  7. Home, listing, article/detail, and contact pages; code, public URL, audits, measurements, and a case study.
  8. State known limits honestly and identify the next useful iteration.