Recap Challenge
Part of the CSS Mastery section of Coddy's HTML journey — lesson 25 of 43.
Challenge
EasyIn this challenge, you'll create a simple but modern-looking coffee shop webpage. It's your chance to practice everything you've learned so far — including gradients, CSS filters, transforms, and transitions.
Your task is to complete the following:
- Apply a linear gradient to the background of the hero section. You can use any colors you like.
- On hover, make the CTA button rotate slightly with
transform: rotate(-3deg)and add a smooth transition. - Apply a filter
sepia(60%)to the coffee image in its default state. - On hover, change the coffee image filter to
sepia(0%), enlarge it withtransform: scale(1.1).
Try it yourself
<html>
<head>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
text-align: center;
}
/* Hero Section with Gradient */
.hero {
padding: 80px 20px;
color: #3e2723;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 10px;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 20px;
}
.cta-btn {
background-color: #8d6e63;
color: white;
padding: 12px 24px;
border-radius: 8px;
font-size: 1rem;
}
/* Gallery section */
.gallery {
padding: 50px 20px;
background: #fffaf0;
}
.gallery h2 {
margin-bottom: 20px;
font-size: 2rem;
color: #4e342e;
}
.coffee-img {
max-width: 300px;
border-radius: 12px;
}
/*Add your CSS here */
</style>
</head>
<body>
<header class="hero">
<h1>Welcome to Coffee Bliss</h1>
<p>Your daily dose of joy in a cup</p>
<button class="cta-btn">Order Now</button>
</header>
<section class="gallery">
<h2>Our Signature Blend</h2>
<img src="https://images.unsplash.com/photo-1509042239860-f550ce710b93?auto=format&fit=crop&w=600&q=80" alt="Cup of Coffee" class="coffee-img" />
</section>
</body>
</html>
All lessons in CSS Mastery
1Selector Mastery – Combination
IntroductionDescendant SelectorChild SelectorAdjacent Sibling SelectorGeneral Sibling SelectorRecap Challenge