0
0
CSSmarkup~20 mins

What is CSS - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CSS Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the main purpose of CSS?
CSS is used to control the appearance of web pages. What does CSS mainly do?
AIt makes the webpage interactive with buttons and forms.
BIt stores data and manages databases for the webpage.
CIt styles and formats the webpage's layout and colors.
DIt adds structure and content to the webpage.
Attempts:
2 left
💡 Hint
Think about how websites change colors, fonts, and layout.
📝 Syntax
intermediate
1:30remaining
Which CSS rule correctly changes text color to blue?
Look at these CSS rules. Which one will make the text color blue?
CSS
p {
  color: blue;
}
Ap { font-color: blue; }
Bp { color: blue; }
Cp { text-color: blue; }
Dp { color = blue; }
Attempts:
2 left
💡 Hint
The property to change text color is just 'color'.
rendering
advanced
2:00remaining
What will be the background color of the box?
Given this CSS, what color will the box's background be?
CSS
div.box {
  background-color: #ff0000;
  background-color: rgb(0, 255, 0);
}
ARed
BNo background color
CBlue
DGreen
Attempts:
2 left
💡 Hint
Later rules override earlier ones if they target the same property.
selector
advanced
2:00remaining
Which CSS selector targets only paragraphs inside a section?
You want to style only <p> tags that are inside a <section>. Which selector is correct?
Asection p
Bp section
Csection > p
Dp > section
Attempts:
2 left
💡 Hint
Think about how selectors read from left to right for descendants.
accessibility
expert
2:30remaining
Which CSS practice improves accessibility for colorblind users?
You want to make sure your website is easy to read for colorblind users. Which CSS practice helps the most?
AUse high contrast colors and add text labels or icons.
BUse very light colors for backgrounds and text.
CUse only color to convey important information.
DUse multiple colors that look similar to each other.
Attempts:
2 left
💡 Hint
Think about how people who cannot see colors well can still understand content.