Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
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 | |
|---|---|---|
| 1#intro { color: navy; } | AAdds an id attribute so this heading can be targeted with #title in CSS | |
| 2<h1 id="title">Hello</h1> | BWrong selector type — a dot targets a class, not an id; should be #logo | |
| 3ID values must be unique on a page | C<p id="note">One note</p> | |
| 4ID selectors have higher specificity than class selectors | DTargets the element with id="intro" and sets its text colour to navy | |
| 5# hero { color: red; } | EInvalid — a space between # and the name breaks the selector; write #hero | |
| 6.logo { width: 100px; } | F#box { background: red; } |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
#id — A CSS selector that targets one unique element by matching its id attribute; written as a hash symbol followed by the id value#header { color: blue; }<p id="intro">Hello</p>#main { background: red; }#nav { font-size: 18px; }#footer { margin: 0; }