NEW
Font size
Worksheets100Devs - LwL - Class03 - CSS Basics
Total questions: 49
Worksheet time: 25mins
Where could inline CSS be used?
On emails
it should never be
only if it important
In desperation mode due to deadlines
css link tag syntax
<link rel=”stylesheet” href=”css/style.css”>
<a rel="stylesheet" href="css/style.css">
<link rel="stylesheet" src="css/style.css">
All should work
What is this: p { color: red; }
A CSS rule
A selector
A property
A declaration block
What is the css property here: p { color: red; }
color
p
red
a class
This is the CSS:
p{
color: red;
font-weight: bold;
}
p{
color: blue;
}
What is the color and weight of the <p>s?
blue and bold
red and bold
just blue
just bold
<section>
<p>Hello, Twitch!</p>
</section>
How to select the <p> by direct descendant relationship?
section > p
section
p
section p
What is selection by relationship?
It selects an element that exists inside another element.
It selects an element that is an immediate child of a parent element.
Both are correct
<section>
<p>Hello, Twitch!</p>
<p>Hello, Youtube!</p>
</section>
and
p + p {
color: red;
}
What gets red?
The second <p> tag
The first <p> tag
The <section>
It wont work because there are two <p>s
In this example, what is the CSS rule:
section > div {
border: 1px solid black;
margin: 2em;
}
section > div {
border: 1px solid black;
margin: 2em;
}
section > div
{
border: 1px solid black;
margin: 2em;
}
In this example, what is the CSS selector:
section > div {
border: 1px solid black;
margin: 2em;
}
section > div
section > div {
border: 1px solid black;
margin: 2em;
}
{
border: 1px solid black;
margin: 2em;
}
In this example, what is the CSS declaration block:
section > div {
border: 1px solid black;
margin: 2em;
}
{
border: 1px solid black;
margin: 2em;
}
border: 1px solid black; and margin: 2em;
section > div {
border: 1px solid black;
margin: 2em;
}
border and margin
In this example, what is the CSS declaration:
section > div {
border: 1px solid black;
margin: 2em;
}
border: 1px solid black; and margin: 2em;
border and margin
1px solid black and 2em
section > div {
border: 1px solid black;
margin: 2em;
}
In this example, what is the CSS property:
section > div {
border: 1px solid black;
margin: 2em;
}
border and margin
border: 1px solid black; and margin: 2em;
section > div {
border: 1px solid black;
margin: 2em;
}
1px solid black and 2em
In this example, what is the CSS value:
section > div {
border: 1px solid black;
margin: 2em;
}
1px solid black and 2em
border: 1px solid black; and margin: 2em;
{
border: 1px solid black;
margin: 2em;
}
section > div
