Menu
Coddy logo textTech

Style the button

Part of the CSS Mastery section of Coddy's HTML journey. Lesson 27 of 43.

challenge icon

Challenge

Easy

In this lesson, we’ll make the call-to-action button stand out and feel interactive. Right now, it looks like plain text — let’s turn it into a real button with hover and click effects!

Your CSS Challenge:

  1. Style the .btn class to make it look like a real button, set the background color to #ff9933.
  2. Use :hover to change the background color when the user hovers over the button.
  3. Use :active to change the background color when the button is clicked.
  4. Add a transition so the hover and active effects feel smooth.
  5. Add margin-bottom for the paragraph in the header, so it doesn't look too close to the button.

Try it yourself

<html>
<head>
  <title>Hobby Club Landing Page</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
    
  <header class="hero">
      <div class="container">
        <h1>Welcome to Hobby Club</h1>
        <p>Find your passion. Join a community. Grow your skills.</p>
        <a href="#" class="btn">Get Started</a>
      </div>
  </header>

  <section class="features">
    <h2 class="section-title">Popular Clubs</h2>
    <div class="cards">
      <div class="feature">
        <div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/f/fa/Android_Emoji_1f4f7_red.svg" width="20px"></div>
        <h3>Photography</h3>
        <p>Capture the moment and share your perspective.</p>
      </div>
      <div class="feature">
        <div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/5/51/Emoji_u1f3a8.svg" width="20px"></div>
        <h3>Art & Design</h3>
        <p>Draw, paint, and bring your creative ideas to life.</p>
      </div>
      <div class="feature">
        <div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/e/e6/Emoji_u1f3ae.svg" width="20px"></div>
        <h3>Gaming</h3>
        <p>Connect with fellow gamers and play your favorite titles.</p>
      </div>
    </div>
  </section>

</body>
</html>

All lessons in CSS Mastery

Practice on your own: Web playground