Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Element (type) selectors worksheet is part of the HTML and CSS Journey journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1p { color: red; } | ATargets every <h1> element and sets its size and colour — applies to all instances on the page | |
| 2h1 { font-size: 2em; color: darkblue; } | BCSS declarations require a colon between property and value — it should be color: red; | |
| 3An element selector uses the lowercase HTML tag name with no prefix | Cp { color: blue; } | |
| 4Element selectors are the least specific — class and id selectors override them | DElement selectors should be lowercase — use 'p' not 'P' to match HTML convention | |
| 5P { color: red; } | Ea { text-decoration: none; } | |
| 6p { color red; } | FTargets every <p> element on the page and sets its text colour to red |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
p { } — An element selector that targets every <p> element on the page. The tag name is used directly as the selector, followed by a CSS declaration block.p { color: red; }h1 { font-size: 32px; }p { color: navy; }a { text-decoration: none; }ul { list-style: none; }