Tsallaka zuwa abun ciki
Justice Tech School

Rules, Selectors and Declarations

A rule has a selector and a declaration block. Each declaration is a property, a colon, a value and a semicolon. Group declarations inside curly braces.

Example
<style>
h2 { color: #f59e0b; font-size: 22px; }
</style>
<h2>Styled heading</h2>

Exercise

Name the part before the braces.

The  picks elements

Quiz Test

What ends a CSS declaration?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.