Header
Part of the CSS Mastery section of Coddy's HTML journey. Lesson 36 of 43.
Challenge
EasyYour task is to style the .header section to make it stand out at the top of the page.
- Add a dark background color and white text for contrast.
- Center the text inside the header.
- Add some padding to give the content space.
- Use a large font size to make the site title pop.
- Add rounded corners and a small margin at the bottom to separate it from other sections.
Try it yourself
<html>
<head>
<title>FlavorFiesta</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header class="header">FlavorFiesta</header>
<section class="hero">
<h1>Delicious Recipes & Culinary Adventures</h1>
<p>Your daily dose of flavor, fun, and food!</p>
</section>
<section class="featured">
<h2>Featured Recipes</h2>
<div class="recipe-grid">
<div class="recipe-card">
<img src="https://upload.wikimedia.org/wikipedia/commons/a/a0/Food-pasta-spinach_%2824218510092%29.jpg" alt="Pasta">
<p> Creamy Spinach Pasta</p>
</div>
<div class="recipe-card">
<img src="https://upload.wikimedia.org/wikipedia/commons/6/62/NCI_Visuals_Food_Hamburger.jpg" alt="Burger">
<p> Classic Beef Burger</p>
</div>
<div class="recipe-card">
<img src="https://upload.wikimedia.org/wikipedia/commons/1/1e/Quinoa%2C_Black_Bean%2C_and_Mango_Salad.png" alt="Salad">
<p> Quinoa & Avocado Salad</p>
</div>
</div>
</section>
<footer class="footer">
<p>© 2025 FlavorFiesta | Follow us @flavorfiesta</p>
</footer>
</div>
</body>
</html>
All lessons in CSS Mastery
1Selector Mastery – Combination
IntroductionDescendant SelectorChild SelectorAdjacent Sibling SelectorGeneral Sibling SelectorRecap ChallengePractice on your own: Web playground