What is the error in this code? div { border 1px solid black; }
Anonymous Quiz
5%
Works normally
90%
Missing colon
5%
Changes color
0%
Hides element
What does this code do? div { position: absolute; top: 10px; left: 20px; }
Anonymous Quiz
93%
Positions the element relative to the page or container
0%
Hides the element
8%
Changes color
0%
Changes size
What does this code do? div { box-shadow: 2px 2px 5px grey; }
Anonymous Quiz
88%
Adds shadow around the element
8%
Changes background color
5%
Hides the element
0%
Adds border
What is the error in this code? p { margin-top 20px; }
Anonymous Quiz
83%
Missing colon
10%
Works normally
7%
Changes color
0%
Hides text
What does this code do? a { pointer-events: none; }
Anonymous Quiz
85%
Prevents interaction with the link
8%
Changes color
8%
Hides the link
0%
Adds underline
What is the effect of this code? div { transform: rotate(45deg); }
Anonymous Quiz
90%
Rotates the element 45 degrees clockwise
5%
Rotates the element 90 degrees
5%
Flips the element vertically
0%
No effect
What does this grid code do? .container { display: grid; grid-template-columns: 1fr 2fr; }
Anonymous Quiz
22%
Creates 2 equal columns
68%
Creates 1 small and 1 large column
10%
Creates 3 columns
0%
Hides the content
❤1
What is the error in this code? div { transform scale(1.5); }
Anonymous Quiz
7%
Works normally
49%
Missing colon
44%
Missing colon after transform
0%
Wrong property name
What does this animation do? @keyframes fade { from { opacity: 0; } to { opacity: 1; } } div { animation: fade 2s; }
Anonymous Quiz
28%
Makes the element disappear
55%
Makes the element fade in
13%
Makes the element blink
5%
No effect
What is the effect of this code? .container { display: grid; grid-template-rows: 100px auto; }
Anonymous Quiz
76%
Creates 2 rows: one fixed and one flexible
14%
Creates 2 equal rows
5%
Creates 3 rows
5%
No effect
What is the expected result of this code?
div {
width: 200px; height: 100px; padding: 20px; }
div {
width: 200px; height: 100px; padding: 20px; }
Anonymous Quiz
71%
Total width becomes 240px and total height becomes 140px
20%
Total width becomes 200px and total height becomes 100px
2%
Total width becomes 160px and total height becomes 60px
7%
Only the content area changes size.
Which selector is used to select all elements of a specific type, e.g. all <p> tags?
Anonymous Quiz
33%
*
13%
7%
.p
48%
p
How do you select elements with the class name "menu"?
Anonymous Quiz
8%
menu
16%
76%
.menu
0%
*menu
Which of the following is a valid CSS comment?
Anonymous Quiz
8%
# comment
73%
/* comment */
6%
// comment
12%
<!-- comment -->
Which selector selects elements only if they are the immediate sibling?
Anonymous Quiz
15%
A > B
64%
A + B
13%
A ~ B
9%
A B
Which shorthand is correct for padding top=10px, right=20px, bottom=30px, left=40px?
Anonymous Quiz
21%
padding: 10 20 30 40;
26%
padding: top 10 right 20 bottom 30 left 40;
14%
padding: 10px, 20px, 30px, 40px;
38%
padding: 10px 20px 30px 40px;
Syntax of media query for screens smaller than 600px is:
Anonymous Quiz
79%
@media (max-width: 600px)
13%
@media (width < 600px)
6%
@media screen < 600px
2%
@media width <= 600px
What does (min-width: 768px) mean?
Anonymous Quiz
37%
Applies if screen is smaller than 768px
10%
Applies only if width = 768px
53%
Applies if screen is at least 768px
0%
Always applies
Which is the correct CSS syntax to change the background color to blue?
Anonymous Quiz
24%
background-color: blue;
6%
body {bg: blue;}
0%
body {background=blue;}
69%
body {background-color: blue;}
❤1
The correct syntax to link CSS in HTML is:
Anonymous Quiz
3%
<style src="style.css">
10%
<style href="style.css">
84%
<link rel="stylesheet" href="style.css">
2%
<css link="style.css">