BCA Student Stories & UpdatesLive
CSS Colors, Fonts & Text Styling
Typography and curated color harmony dictate 90% of user trust and perception on a website. Modern web apps use tailored HSL/Hex color palettes and crisp web fonts instead of generic browser defaults.
Day 10 Step-by-Step Practical Flow
🎯1. What You Will Learn Today
CSS Colors, Fonts & Text Styling — Comprehensive Practical Guide
Har concept ko visual mental models, code anatomy aur practical industry tips ke sath samjhein.
Typography and curated color harmony dictate 90% of user trust and perception on a website. Modern web apps use tailored HSL/Hex color palettes and crisp web fonts instead of generic browser defaults.
"Colors set the emotional mood of your room, while fonts are the voice tone in which your website speaks."
👨🏫3. Teacher Demonstration Code
Notice how importing the Inter font transforms the visual elegance immediately.
/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background-color: #060c18;
color: #f1f5f9;
line-height: 1.6;
}
h1 {
color: #ffffff;
font-size: 2.25rem; /* 36px */
font-weight: 800;
letter-spacing: -0.025em;
}
.text-accent {
color: #04AA6D;
font-weight: 600;
}
.subtitle {
color: #94a3b8;
font-size: 1.125rem;
text-transform: uppercase;
letter-spacing: 0.05em;
} 2. Hands-On Practical Lab: Follow Instructions in VS Code
Code like a professional software engineer! Follow the step-by-step instructions below in Visual Studio Code (VS Code) on your PC, test your output locally, and push to GitHub.
Day 10 Practical Task Test Studio
In `<style>`, set `.promo-box` with `background-color: #0c1328;` and `color: #ffffff;`.
Add a `.desc` rule setting `line-height: 1.6;` and `color: #94a3b8;`.
Spot the Bug: Font Name with Spaces Missing Quotes
Tap or click on the exact line below that contains the error:
Click any code linebody { font-family: Open Sans, sans-serif;}Senior Developer Forensic Analysis:
Font family names containing whitespace (e.g. Open Sans, Courier New) MUST be wrapped in quotation marks. Otherwise, some browsers will fail to parse the font declaration.
📝Independent Practice: Assignment
📄 themed-article.htmlHomework Task: Themed Tech Article Layout
- •Import a Google Font of your choice (e.g., "Outfit", "Poppins", or "Inter").
- •Create a dark-themed blog article with a curated color palette: Background `#060c18`, Surface Card `#0c1328`, Primary Text `#ffffff`, Accent `#04AA6D`, Muted `#94a3b8`.
- •Apply `line-height: 1.7` to paragraphs to ensure optimal readability.
- •Add a call-out quote block with an italic font and an emerald green left border.
Open Visual Studio Code on your PC (code .), create themed-article.html, paste this complete step-by-step verified code, test in your browser, and push to your GitHub repo:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BCA Day 10 - Themed Tech Article Layout</title>
<!-- Google Font: Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap" rel="stylesheet">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background-color: #060c18;
color: #ffffff;
padding: 40px 20px;
line-height: 1.7;
}
.article-container {
max-width: 680px;
margin: 0 auto;
background-color: #0c1328;
border: 1px solid #1e293b;
border-radius: 16px;
padding: 36px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.tag {
display: inline-block;
color: #04AA6D;
font-size: 12px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 1.2px;
margin-bottom: 8px;
}
h1 {
font-size: 28px;
font-weight: 800;
margin-bottom: 16px;
color: #ffffff;
line-height: 1.3;
}
p {
color: #cbd5e1;
margin-bottom: 20px;
font-size: 15px;
}
blockquote {
border-left: 4px solid #04AA6D;
background-color: rgba(4, 170, 109, 0.08);
padding: 16px 20px;
margin: 24px 0;
border-radius: 0 8px 8px 0;
font-style: italic;
color: #94a3b8;
}
footer {
border-top: 1px solid #1e293b;
padding-top: 16px;
margin-top: 24px;
font-size: 13px;
color: #64748b;
}
</style>
</head>
<body>
<article class="article-container">
<span class="tag">Web Design & Architecture</span>
<h1>Building Accessible Modern Dark Themes</h1>
<p>Good typography and color harmony make software interfaces comfortable to read for hours. By pairing high-contrast pure white headers with subtle dark navy surfaces and emerald accents, developers can create stunning visual experiences.</p>
<blockquote>
"Design is not just what it looks like and feels like. Design is how it works." — Steve Jobs
</blockquote>
<p>This layout adheres to WCAG AA color contrast standards, ensuring clarity and readability across all desktop and mobile screens.</p>
<footer>
<p>© 2026 BCA Practical Day 10 • Completed 100% in Visual Studio Code</p>
</footer>
</article>
</body>
</html>🎓4. Viva Check: Mandatory Conceptual Test
What does the fourth value in `rgba(4, 170, 109, 0.5)` represent?
5. Mandatory Step: Push to GitHub to Unlock Next Lesson
Target Repo: html-css-projects
Exact GitHub Setup Guide & Expected Structure
Day 10 RequirementsFollow these exact folder and file names to prevent verification errors.
index.html: Avoid spaces or custom names like Alan Turing..html or Index.HTML. Linux/GitHub servers are strictly case-sensitive.day-10/ for today so you don't overwrite previous days.main.You are welcome to read all notes, inspect code snippets, and practice all exercises of Day 10 freely! To officially submit your GitHub repository and unlock subsequent days in your portfolio, please complete Day 9: CSS Selectors & Basic Styling first.
Complete Day 9 First