Challenge - 5 Problems
Background Repeat Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What does
background-repeat: no-repeat; do?If you apply
background-repeat: no-repeat; to an element with a background image, what will happen?Attempts:
2 left
💡 Hint
Think about what 'no-repeat' means in everyday language.
✗ Incorrect
The no-repeat value means the background image shows only once. It does not tile horizontally or vertically.
📝 Syntax
intermediate2:00remaining
Which CSS rule correctly repeats a background image horizontally only?
Choose the CSS rule that makes the background image repeat only from left to right, but not up and down.
Attempts:
2 left
💡 Hint
The 'x' in 'repeat-x' hints at horizontal direction.
✗ Incorrect
repeat-x repeats the background image horizontally only.
❓ rendering
advanced2:30remaining
What will you see with this CSS snippet?
Given this CSS:
What is the visual effect on the div's background?
div {
width: 200px;
height: 100px;
background-image: url('pattern.png');
background-repeat: repeat-y;
}What is the visual effect on the div's background?
CSS
div {
width: 200px;
height: 100px;
background-image: url('pattern.png');
background-repeat: repeat-y;
}Attempts:
2 left
💡 Hint
Think about the 'y' in 'repeat-y'.
✗ Incorrect
repeat-y repeats the background image vertically only, so the image stacks from top to bottom inside the div.
❓ selector
advanced2:30remaining
Which CSS selector applies background-repeat only to paragraphs inside a section?
You want to apply
background-repeat: no-repeat; only to <p> elements inside a <section>. Which selector is correct?Attempts:
2 left
💡 Hint
Think about the order of parent and child in selectors.
✗ Incorrect
section p selects all <p> elements inside any <section>. This is the correct way to target paragraphs inside sections.
❓ accessibility
expert3:00remaining
Why should you be careful using
background-repeat with important content images?If you use a background image with
background-repeat: repeat; that contains important information, what accessibility issue might occur?Attempts:
2 left
💡 Hint
Think about how screen readers treat background images.
✗ Incorrect
Background images are decorative and ignored by screen readers. If important info is only in a repeated background image, users relying on assistive tech may miss it or get confused.