Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Advanced CSS & Responsive DesignEasy
Q1. What is CSS Flexbox?
- A.A JavaScript library for DOM element manipulation
- B.A CSS keyframe animation type for effects
- C.A third-party CSS framework for styling pages
- D.A layout model for one-dimensional rows or columns✓ Correct
Explanation
Flexbox distributes space among items in a container along a single axis.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q2. Which CSS property creates a flex container?
- A.display: flex✓ Correct
- B.flex: true
- C.layout: flex
- D.container: flex
Explanation
Setting display: flex makes an element a flex container.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q3. What is CSS Grid?
- A.A JavaScript grid plugin for data tables
- B.A third-party CSS component library
- C.A replacement exclusively for HTML tables
- D.A two-dimensional layout for rows and columns✓ Correct
Explanation
CSS Grid is a two-dimensional layout system for rows and columns simultaneously.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q4. Which property defines grid columns?
- A.column-template
- B.grid-template-columns✓ Correct
- C.display-columns
- D.grid-columns
Explanation
grid-template-columns defines the number and size of columns in a Grid container.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q5. What is a media query in CSS?
- A.A query for fetching database records
- B.A technique applying styles based on device traits✓ Correct
- C.An HTML element for embedding external content
- D.A JavaScript API for browser feature detection
Explanation
Media queries apply CSS rules conditionally based on device features.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q6. Which property controls the direction of flex items?
- A.flex-align
- B.flex-direction✓ Correct
- C.flex-orient
- D.flex-flow
Explanation
flex-direction sets whether flex items are arranged in a row or column.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q7. What does justify-content do in Flexbox?
- A.Distributes space between items along main axis✓ Correct
- B.Sets the font family for text inside items
- C.Aligns items along the cross axis vertically
- D.Changes the text alignment within flex items
Explanation
justify-content controls how flex items are distributed along the main axis.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q8. What is a CSS transition?
- A.A JavaScript event triggered by user action
- B.A smooth change between CSS property values✓ Correct
- C.An HTML animation tag for visual effects
- D.A page redirect to a new URL location
Explanation
CSS transitions allow property changes to occur smoothly over a specified duration.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q9. Which property creates a CSS animation?
- A.transition
- B.animation✓ Correct
- C.motion
- D.animate
Explanation
The animation property with @keyframes applies an animation to an element.
Report an error in this question
Advanced CSS & Responsive DesignEasy
Q10. What does align-items do in Flexbox?
- A.Sets item width
- B.Aligns items along the main axis
- C.Aligns items along the cross axis✓ Correct
- D.Changes item order
Explanation
align-items controls how flex items are aligned along the cross axis.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q11. What is the difference between Flexbox and Grid?
- A.They behave identically in all layout situations
- B.Flexbox was introduced after Grid in the spec
- C.Flexbox is one-dimensional, Grid is two-dimensional✓ Correct
- D.Grid is designed exclusively for table layouts
Explanation
Flexbox handles one dimension at a time, while Grid handles two dimensions simultaneously.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q12. What does grid-template-areas do?
- A.Creates content for individual grid items
- B.Defines named grid areas for placing items✓ Correct
- C.Creates decorative borders around grid cells
- D.Sets the color scheme for the grid layout
Explanation
grid-template-areas lets you name regions of the grid for intuitive layout design.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q13. What is a CSS pseudo-element?
- A.An HTML5 semantic element like header or footer
- B.A fake HTML element added via JavaScript
- C.A keyword styling a specific part of an element✓ Correct
- D.A JavaScript component for building interfaces
Explanation
Pseudo-elements like ::before and ::after style specific parts of an element.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q14. What is the fr unit in CSS Grid?
- A.A frequency measurement unit for media queries
- B.A font ratio measurement unit for sizing
- C.A fraction of available space in the container✓ Correct
- D.A frame rate measurement unit for animations
Explanation
The fr unit represents a share of the available space in a grid container.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q15. How do you create a responsive breakpoint for tablets?
- A.@responsive (tablet)
- B.@tablet { max-width }
- C.@breakpoint (tablet)
- D.@media (max-width: 768px)✓ Correct
Explanation
@media (max-width: 768px) is a common media query breakpoint for tablets.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q16. What does flex-wrap: wrap do?
- A.Creates a decorative border around all items
- B.Prevents items from wrapping to new lines
- C.Wraps the text content within each flex item
- D.Allows flex items to wrap onto multiple lines✓ Correct
Explanation
flex-wrap: wrap allows flex items to flow onto the next line.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q17. What is the gap property in CSS Grid?
- A.A gap in browser support for older versions
- B.A grid rendering error in certain browsers
- C.Sets the spacing between grid rows and columns✓ Correct
- D.The outer margin space around the entire grid
Explanation
The gap property sets the spacing between grid rows and columns.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q18. What does @keyframes define in CSS?
- A.Key events handled in JavaScript listeners
- B.The stages of a CSS animation sequence✓ Correct
- C.Keyboard shortcut bindings for the browser
- D.Database primary and foreign key definitions
Explanation
@keyframes defines the intermediate steps in a CSS animation.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q19. What is the object-fit CSS property?
- A.A flexbox property for controlling item alignment
- B.Specifies how an image resizes to fit its container✓ Correct
- C.A grid alignment property for placing grid items
- D.Fits text content into its parent containers
Explanation
object-fit controls how replaced content is resized to fit its container.
Report an error in this question
Advanced CSS & Responsive DesignMedium
Q20. What is a mobile-first design approach?
- A.Using only mobile-specific CSS frameworks
- B.Designing websites for desktop screens first
- C.Designing for small screens first then enhancing✓ Correct
- D.Designing websites for mobile devices only
Explanation
Mobile-first starts with styles for small screens and uses min-width media queries for larger screens.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q21. What is CSS Subgrid?
- A.A third-party CSS grid component library
- B.A sub-layout variation of the Flexbox model
- C.A Grid feature letting nested grids adopt parent tracks✓ Correct
- D.A standalone CSS framework for page layouts
Explanation
Subgrid allows a nested grid to inherit row or column tracks from its parent grid.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q22. What is the CSS aspect-ratio property?
- A.A media query feature for responsive design
- B.The ratio of CSS file sizes in a project
- C.A JavaScript API for measuring dimensions
- D.Sets a preferred aspect ratio for an element✓ Correct
Explanation
aspect-ratio sets the preferred width-to-height ratio for an element.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q23. What is CSS Container Queries?
- A.Docker container related CSS configuration
- B.Media queries designed for flex containers
- C.Queries about the size of CSS containers
- D.Rules applying styles based on container size✓ Correct
Explanation
Container Queries allow components to adapt styles based on their container's size.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q24. What is the CSS isolation property?
- A.Removes an element completely from the DOM tree
- B.Creates a new stacking context for the element✓ Correct
- C.Isolates an element from the internet connection
- D.Blocks all external CSS from affecting the element
Explanation
The isolation property forces an element to create a new stacking context.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q25. What is the difference between transform and position for moving elements?
- A.transform skips layout recalculation; position triggers it✓ Correct
- B.transform only works within CSS Grid containers
- C.position is faster for rendering than transform
- D.They produce the same visual result always
Explanation
transform moves elements on the GPU without triggering layout reflow.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q26. What are CSS Logical Properties?
- A.Properties with conditional logic based on breakpoints
- B.Properties that adapt to writing direction like inline-start✓ Correct
- C.Boolean CSS properties that toggle features on or off
- D.Properties that use logic gates for conditional values
Explanation
Logical Properties replace physical properties to support different writing modes.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q27. What is the prefers-reduced-motion media query?
- A.A query detecting slow network connection speeds
- B.A query specifically targeting mobile touch devices
- C.A query detecting if user prefers less animation✓ Correct
- D.A query for applying print-specific style rules
Explanation
prefers-reduced-motion detects if a user has enabled reduced motion in their OS settings.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q28. What is CSS Houdini?
- A.A popular CSS framework for responsive layouts
- B.Low-level APIs giving access to the CSS engine✓ Correct
- C.A browser debugging tool for inspecting CSS
- D.A magic trick animation library for CSS effects
Explanation
CSS Houdini provides APIs that let developers extend CSS by hooking into the rendering pipeline.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q29. What is the content-visibility CSS property?
- A.Enables browser to skip rendering off-screen elements✓ Correct
- B.Controls how text content is displayed on screen
- C.An alternative to z-index for controlling layer order
- D.A toggle switching element visibility on and off
Explanation
content-visibility: auto lets the browser skip rendering off-screen elements.
Report an error in this question
Advanced CSS & Responsive DesignHard
Q30. How does the CSS cascade layer (@layer) work?
- A.It creates z-index layers for positioned elements
- B.It layers multiple background images on a single element
- C.It creates visible visual layers stacked on the page
- D.It defines explicit layers giving control over precedence✓ Correct
Explanation
@layer creates cascade layers that provide explicit control over style precedence.
Report an error in this question