LESSON 08 OF 100

Descendant selector

Style only paragraphs inside the card class.

Official sourceW3C Selectors Level 4Reviewed: 2026-08-26
STEP 1 · LEARN

How it works

The selector determines which elements receive the declarations. For this relationship use a space between ancestor and descendant

Correct example
.card p { color: #334155; }

The selector targets exactly the required elements and the declaration changes only the named property.

Common mistake
cardp { color #334155; }

An approximate selector or a declaration without a colon does not describe the requested rule.

STEP 2 · APPLY

Your exercise

Style only paragraphs inside the card class.

STEP 3 · BUILD

Write and see the result

index.htmlCSS
Safe resultisolated
The draft stays only in this browser.HTML and CSS allowed · scripts and network blocked
STEP 4 · CHECK

What needs to pass

0%not checked
  • The required selector and declaration are present.
  • The HTML example contains the required targets.
Explain the solution logic

Write the exact selector before the braces and keep the complete declaration inside the block.