What does a size container query respond to? (A) The size of a query container (B) Only the document title (C) Database rows (D) Font file size. Answer: A. It responds to the queried container's size.
Which property establishes an inline-size query container? (A) container-type: inline-size (B) display: query (C) position: container (D) query-size: auto. Answer: A. Container-type defines the container's query capability.
What is a common use for container queries? (A) Reusable components adapting to their allocated width (B) Storing user accounts (C) Creating HTML elements dynamically (D) Replacing all CSS. Answer: A. They allow component-level responsiveness.
What does a named container help identify? (A) An eligible ancestor query container (B) A JavaScript function (C) A database table (D) A CSS comment. Answer: A. Names allow queries to target a particular container.
Can an element ordinarily query its own container size through its own descendant-style rule? (A) Yes (B) No, the query targets an eligible ancestor container (C) Only with IDs (D) Only with Flexbox. Answer: B. The query container must be an appropriate ancestor.
What does cqi represent? (A) One percent of the query container's inline size (B) One pixel (C) One percent of root font size (D) One grid line. Answer: A. Cqi is a container query inline-size unit.
Which is better for viewport-level changes? (A) Media queries (B) Container queries only (C) Float (D) Text decoration. Answer: A. Media queries target viewport and device conditions.
Can one component adapt differently in a sidebar and a main content area? (A) Yes, with container queries (B) No (C) Only with JavaScript (D) Only with tables. Answer: A. Its parent container sizes can differ.
What is a key advantage of container queries? (A) Components respond to available component space (B) They eliminate HTML (C) They guarantee every browser supports every feature (D) They remove the cascade. Answer: A. They improve component-level layout adaptability.
Should browser support be checked before using newer CSS features? (A) Yes (B) No (C) Only on servers (D) Only with PHP. Answer: A. Compatibility depends on target browsers and feature support.
Key Takeaways
Container queries respond to component space, not only viewport width.
Define an appropriate query container before querying descendants.
Use container units for fluid component-level sizing.
Rate this course
No ratings yet — yours can be the first.
Stars show on this course. Your written note stays private.