Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to select all p elements inside .container.
SASS
.container {
[1] {
color: blue;
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
& p adds unnecessary nesting.Using class or ID selectors like
.p or #p won't select p tags.✗ Incorrect
Use
p to select all paragraph elements inside .container without extra nesting.2fill in blank
mediumComplete the code to style li elements inside .menu without nesting inside ul.
SASS
.menu {
[1] {
font-weight: bold;
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
ul li adds unnecessary nesting.Using
& li requires nesting inside ul.✗ Incorrect
Directly using
li inside .menu minimizes nesting and styles all list items.3fill in blank
hardFix the error in the code to avoid deep nesting for .card .title styling.
SASS
.card {
[1] {
font-size: 1.5rem;
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
.card .title repeats the parent selector unnecessarily.Using
.title alone may not scope styles correctly.✗ Incorrect
Using
& .title correctly nests .title inside .card without repeating the parent selector.4fill in blank
hardFill both blanks to create a flat style for .nav and its a links without deep nesting.
SASS
.nav {
[1] {
color: red;
}
[2] {
text-decoration: none;
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
a alone in the first blank is invalid CSS.Using
color: blue; in the first blank does not set background color.✗ Incorrect
Set background color directly on
.nav and style links with & a to avoid extra nesting.5fill in blank
hardFill all three blanks to create a minimal nesting style for .footer, its p tags, and strong inside p.
SASS
.footer {
[1]
[2] {
font-size: 1rem;
[3] {
font-weight: bold;
}
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
p alone without & in the second blank causes deeper nesting.Using
strong without & in the third blank breaks selector chaining.✗ Incorrect
Set padding on
.footer, style paragraphs with & p, and bold strong inside paragraphs with & strong to keep nesting shallow.