Challenge: Apply Basic Styling
Task
Using the Tailwind CSS utilities for colors, borders, and shadows, create a styled card component with the following specifications:
- The outer container should have:
- A white background color;
- A medium shadow.
- The card should contain:
- A heading (
h2) with text-size of 2xl and text color of gray-900; - A paragraph (
p) with a text color of gray-700.
- A heading (
- Inside the card, create a bordered box with:
- A light blue background color (e.g., blue-50);
- Blue border color;
- Medium rounded corners;
- Text color of blue-700.
- Add another box with:
- A light green background color (e.g., green-100);
- Green border color;
- Rounded corners;
- Small shadow;
- Text color of green-700.
index.html
- Background Colors: Use
bg-white,bg-blue-50,bg-green-100for background colors; - Text Colors: Use
text-gray-900,text-gray-700,text-blue-700,text-green-700for text colors; - Border Colors: Use
border-blue-500,border-green-500for border colors; - Border Radius: Use
rounded-md,roundedfor rounded corners; - Shadows: Use
shadow-md,shadow-smfor shadows; - Text Size: Use
text-2xlfor the heading size.
index.html
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 6
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you show me the complete HTML code for the styled card component?
Can you explain how to structure the card using Tailwind classes?
Can you provide a step-by-step guide to applying these Tailwind utilities?
Awesome!
Completion rate improved to 3.57
Challenge: Apply Basic Styling
Swipe to show menu
Task
Using the Tailwind CSS utilities for colors, borders, and shadows, create a styled card component with the following specifications:
- The outer container should have:
- A white background color;
- A medium shadow.
- The card should contain:
- A heading (
h2) with text-size of 2xl and text color of gray-900; - A paragraph (
p) with a text color of gray-700.
- A heading (
- Inside the card, create a bordered box with:
- A light blue background color (e.g., blue-50);
- Blue border color;
- Medium rounded corners;
- Text color of blue-700.
- Add another box with:
- A light green background color (e.g., green-100);
- Green border color;
- Rounded corners;
- Small shadow;
- Text color of green-700.
index.html
- Background Colors: Use
bg-white,bg-blue-50,bg-green-100for background colors; - Text Colors: Use
text-gray-900,text-gray-700,text-blue-700,text-green-700for text colors; - Border Colors: Use
border-blue-500,border-green-500for border colors; - Border Radius: Use
rounded-md,roundedfor rounded corners; - Shadows: Use
shadow-md,shadow-smfor shadows; - Text Size: Use
text-2xlfor the heading size.
index.html
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 6