Styling a Simple Webpage Using Element Selectors
📖 Scenario: You are creating a simple webpage for a small bakery. The page has a header, a main section with some paragraphs, and a footer. You want to style these elements using CSS element selectors to make the page look neat and welcoming.
🎯 Goal: Build a CSS stylesheet that uses element selectors to style the header, p paragraphs, and footer elements with different background colors, text colors, and padding.
📋 What You'll Learn
Use element selectors to style the
header, p, and footer elements.Set the
header background color to lightpink and text color to darkred.Set the
p paragraphs text color to darkgreen and add padding of 1rem.Set the
footer background color to lightgray and center the text.💡 Why This Matters
🌍 Real World
Web designers often use element selectors to quickly style common HTML tags across a website for consistent look and feel.
💼 Career
Knowing how to use element selectors is a fundamental skill for front-end developers and web designers to create visually appealing and accessible websites.
Progress0 / 4 steps