Font Size Styling with CSS
📖 Scenario: You are creating a simple webpage for a local bakery. The bakery wants the page to have clear, readable text with different font sizes for the heading and the paragraph.
🎯 Goal: Build a webpage with a heading and a paragraph. Use CSS to set the heading font size to 2.5rem and the paragraph font size to 1.25rem.
📋 What You'll Learn
Create an HTML file with a heading and a paragraph inside the
<main> element.Add a CSS rule to set the font size of the heading to 2.5rem.
Add a CSS rule to set the font size of the paragraph to 1.25rem.
Use semantic HTML elements and ensure the CSS is linked correctly.
💡 Why This Matters
🌍 Real World
Setting font sizes is a basic but essential skill for making text readable and visually appealing on websites.
💼 Career
Web developers and designers frequently adjust font sizes to improve user experience and accessibility.
Progress0 / 4 steps