Recall & Review
beginner
What CSS property is commonly used to create a flexible layout that adjusts to different screen sizes?
The flexbox layout is created using the
display: flex; property. It helps arrange items in rows or columns and adapts well to different screen sizes.Click to reveal answer
beginner
How do you center content both vertically and horizontally using CSS Flexbox?
Use
display: flex; on the container, then add justify-content: center; to center horizontally and align-items: center; to center vertically.Click to reveal answer
intermediate
What CSS technique is best for creating a responsive navigation bar that stacks on small screens?
Use Flexbox with
flex-wrap: wrap; and media queries to change the layout. On small screens, the navigation items can stack vertically for easier tapping.Click to reveal answer
beginner
Which CSS property controls the space between grid items in a CSS Grid layout?
The
gap property controls the space between rows and columns in a CSS Grid layout. It replaces older margin hacks and is easier to manage.Click to reveal answer
beginner
How can you make a button visually accessible and easy to use on all devices?
Use sufficient color contrast, add padding for touch targets, use the
button element for semantics, and include focus styles for keyboard users.Click to reveal answer
Which CSS property is used to create a flexible box layout?
✗ Incorrect
The
display: flex; property activates the flexbox layout, which helps arrange items flexibly.What does the CSS property
gap do in a grid layout?✗ Incorrect
gap sets the spacing between rows and columns in CSS Grid.How do you center content vertically and horizontally with Flexbox?
✗ Incorrect
Using
justify-content and align-items both set to center centers flex items in both directions.Which CSS feature helps make navigation menus stack on small screens?
✗ Incorrect
Media queries allow CSS to change styles based on screen size, enabling responsive stacking.
What is important for making buttons accessible?
✗ Incorrect
High contrast and visible focus styles help all users, including keyboard users and those with vision impairments.
Explain how Flexbox helps create responsive layouts in common UI use cases.
Think about how items adjust and align inside a flexible box.
You got /5 concepts.
Describe how media queries work with CSS Grid or Flexbox to improve UI on small screens.
Consider how CSS changes when the screen is narrow.
You got /5 concepts.