Recall & Review
beginner
What is a card component in web design?
A card component is a container that groups related information visually, like a small box with content such as images, text, and buttons. It helps users scan and understand content easily.
Click to reveal answer
beginner
Which Tailwind CSS utility classes help create a card with shadow and rounded corners?
Use
shadow-lg for shadow and rounded-lg for smooth rounded corners. These classes make the card look lifted and friendly.Click to reveal answer
intermediate
How can you make a card responsive using Tailwind CSS?
Use responsive utilities like
sm:, md:, lg: to adjust padding, width, or layout. For example, w-full md:w-1/3 makes the card full width on small screens and one-third width on medium screens.Click to reveal answer
beginner
Why should you use semantic HTML elements inside a card?
Semantic elements like
<article>, <header>, and <footer> improve accessibility and help screen readers understand the content structure better.Click to reveal answer
intermediate
What Tailwind classes help create a card layout with image on top and text below?
Use
flex flex-col to stack content vertically. Place the image inside a <img> tag with rounded-t-lg for rounded top corners, and text inside a p-4 padded container below.Click to reveal answer
Which Tailwind class adds a shadow effect to a card?
✗ Incorrect
The class
shadow-lg adds a large shadow to create depth on the card.What does the Tailwind class
rounded-lg do to a card?✗ Incorrect
rounded-lg makes the corners of the card smoothly rounded.How can you make a card take full width on small screens and one-third width on medium screens using Tailwind?
✗ Incorrect
Using
w-full md:w-1/3 sets full width on small and one-third width on medium screens.Which semantic HTML element is best to wrap a card's main content?
✗ Incorrect
<article> is used for self-contained content like a card.What Tailwind classes would you use to stack an image above text inside a card?
✗ Incorrect
flex flex-col stacks children vertically, placing image above text.Describe how to build a simple card component using Tailwind CSS that includes an image, title, and description.
Think about container styling and layout direction.
You got /4 concepts.
Explain why semantic HTML and accessibility are important when creating card components.
Consider users who rely on assistive technologies.
You got /4 concepts.