← Lessons
🎨 HTML + CSS for Beginners
Meet CSS
## Where do we write CSS?
Inside a `<style>` tag:
```html
<style>
h1 {
color: blue;
text-align: center;
}
</style>
<h1>Blue heading</h1>
```
## How is a rule written?
```css
selector {
property: value;
}
```
- **Selector** — which element it applies to (`h1`, `p`, `body`)
- **Property** — what to change (`color`)
- **Value** — what to change it to (`red`)
- Put a `;` at the end of every line!
## Common properties
| Property | Job | Example |
|---|---|---|
| `color` | Text colour | `color: red;` |
| `background-color` | Background colour | `background-color: yellow;` |
| `font-size` | Text size | `font-size: 24px;` |
| `text-align` | Alignment | `text-align: center;` |
| `font-style` | Italic | `font-style: italic;` |
> 🧩 Problems: **HTML/CSS → Level 7**
💡 Want to track which lessons you've read and solve problems for points? Sign up for free or log in.