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<p style="color: red;">Hi</p> | A<style> p { color: blue; } </style> | |
| 2<link rel="stylesheet" href="style.css"> | BThe CSS is written as the paragraph text instead of inside the style attribute value. It should be <p style="color: red;">. | |
| 3Internal CSS puts the rules in a style element inside the head of one page | CThe style element sits in the body, not the head. Internal CSS belongs inside head. Also, this CSS is not in an external file, so it cannot be shared by other pages. | |
| 4Inline CSS mixes presentation into the structure because the styling sits inside the tag | D<h1 style="font-size: 40px;">Menu</h1> | |
| 5<p style>color: red;</p> | EExternal CSS: links a separate .css file so many pages can share one stylesheet | |
| 6<body> <style>p { color: red; }</style> </body> | FInline CSS: the style attribute applies a style to this one element only |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
<link rel="stylesheet" href="style.css"> — Adds an external CSS file. Inline uses style=, internal uses <style>, but only this external link lets many pages share one stylesheet and fully separates presentation from structure.<p style="color: red;">Hello</p><head>
<style>p { color: blue; }</style>
</head><link rel="stylesheet" href="style.css"><link rel="stylesheet" href="style.css"><head>
<link rel="stylesheet" href="style.css">
</head>