0
0
CSSmarkup~5 mins

Common UI use cases in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Aposition: absolute;
Bdisplay: flex;
Cfloat: left;
Ddisplay: block;
What does the CSS property gap do in a grid layout?
ASets the background color
BAligns text
CChanges font size
DControls space between grid items
How do you center content vertically and horizontally with Flexbox?
Ajustify-content: center; align-items: center;
Btext-align: center;
Cmargin: auto;
Dfloat: center;
Which CSS feature helps make navigation menus stack on small screens?
AMedia queries
BText shadows
CBox shadows
DFont weights
What is important for making buttons accessible?
ANo padding
BUsing only images
CHigh contrast and focus styles
DRemoving outlines
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.