Styling Text with Font Weight in CSS
📖 Scenario: You are creating a simple webpage to show different font weights for headings and paragraphs. This helps users see how text can look bolder or lighter.
🎯 Goal: Build a webpage with a heading and a paragraph. Use CSS to set the font weight of the heading to bold and the paragraph to normal weight.
📋 What You'll Learn
Create an HTML skeleton with a
<h1> heading and a <p> paragraphAdd a CSS rule to set the font weight of the heading to
700 (bold)Add a CSS rule to set the font weight of the paragraph to
400 (normal)Use semantic HTML and include a
<style> block inside the <head>Ensure the CSS selectors target the correct elements
💡 Why This Matters
🌍 Real World
Web designers often need to control how bold or light text appears to improve readability and design.
💼 Career
Knowing how to use font-weight in CSS is a basic skill for front-end developers and web designers to create visually appealing websites.
Progress0 / 4 steps