CSS Tutorial · Chapter 3 of 7
CSS Colors
Set text and background colors.
Use color for text and background or background-color for surfaces.
Hex values like #0f766e are common in classroom templates.
Color sample
Try it Yourself »
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Tutorial</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="card">
<h1>CoderKiosk CSS Lab</h1>
<p class="muted">Style this page using CSS.</p>
<button class="primary">Start Lesson</button>
</section>
</body>
</html>
style.css
body {
background: #ecfeff;
color: #0f172a;
font-family: Arial, sans-serif;
padding: 32px;
}
h1 {
color: #0f766e;
}
.primary {
background: #0f766e;
color: white;
border: 0;
padding: 10px 14px;
}
Classroom Tips
- Keep contrast readable.
- Avoid pure light text on light backgrounds.