Lesson 1 · Web Explorer
Making text look great.
CSS has exactly two parts to every instruction:
h1 {
color: darkblue;
font-size: 40px;
}
This says: find every <h1>, make it dark blue and 40 pixels tall.
Every CSS rule you ever write follows that shape. Point at something, then describe it.
For now, put your CSS inside a <style> tag in the <head>:
<head>
<title>My Page</title>
<style>
h1 { color: darkblue; }
</style>
</head>
Remember the head is for information about the page — and styling rules are exactly that. They don't appear on screen themselves; they change how everything in the body is drawn.
Later you'll move styles into a separate .css file, which is how real sites do it.
6 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.