0
0
CSSmarkup~5 mins

First CSS stylesheet - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a CSS stylesheet?
A CSS stylesheet is a file or section where you write rules to style HTML elements, like colors, fonts, and layout.
Click to reveal answer
beginner
How do you link a CSS stylesheet to an HTML file?
Use the <link> tag inside the <head> of your HTML: <link rel="stylesheet" href="styles.css" />.
Click to reveal answer
beginner
What does this CSS rule do?
body { background-color: lightblue; }
It changes the background color of the whole page to light blue.
Click to reveal answer
beginner
Why use CSS instead of inline styles?
CSS keeps style separate from content, making it easier to change styles for many pages at once and keeps code clean.
Click to reveal answer
beginner
What is the correct syntax for a CSS rule?
Selector { property: value; } For example: p { color: red; }
Click to reveal answer
Which HTML tag is used to link an external CSS stylesheet?
A&lt;script&gt;
B&lt;style&gt;
C&lt;link&gt;
D&lt;css&gt;
What does this CSS rule do?
h1 { font-size: 2rem; }
ASets the font size of all h1 headings to 2 rem units
BChanges the color of h1 headings to red
CAdds a border around h1 headings
DHides all h1 headings
Where should the <link> tag for CSS be placed in an HTML document?
AInside the &lt;footer&gt;
BInside the &lt;head&gt; section
CAt the end of the &lt;body&gt;
DOutside the &lt;html&gt; tag
Which property changes the text color in CSS?
Atext-align
Bbackground-color
Cfont-size
Dcolor
What is the correct way to write a CSS comment?
A/* This is a comment */
B// This is a comment
C<!-- This is a comment -->
D# This is a comment
Explain how to create and link your first CSS stylesheet to an HTML page.
Think about the file, the CSS code inside, and how HTML knows about it.
You got /4 concepts.
    Describe the basic structure of a CSS rule and what each part does.
    Focus on selector, property, and value.
    You got /5 concepts.