Challenge - 5 Problems
Text Decoration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate1:30remaining
What is the output of this CSS snippet?
Given the CSS below, what will be the style of the text inside the <p> element?
p { text-decoration: underline overline; }CSS
<p>This is a test text.</p>
Attempts:
2 left
💡 Hint
Think about how multiple values for text-decoration work.
✗ Incorrect
The CSS property 'text-decoration' can accept multiple values like 'underline' and 'overline' together, so the text will have both lines above and below.
🧠 Conceptual
intermediate1:00remaining
Which CSS property controls the color of the text decoration?
You want to change the color of an underline on a link. Which CSS property should you use?
Attempts:
2 left
💡 Hint
The property name includes 'text-decoration' and relates to color.
✗ Incorrect
The 'text-decoration-color' property specifically changes the color of the decoration lines like underline or overline, separate from the text color.
❓ rendering
advanced1:30remaining
What will be the visual result of this CSS on a paragraph?
Consider this CSS:
What will the underline look like?
p { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; }What will the underline look like?
CSS
<p>Sample text</p>
Attempts:
2 left
💡 Hint
Look at the 'text-decoration-style' value.
✗ Incorrect
The 'text-decoration-style: wavy' creates a wavy line under the text, and 'text-decoration-color: red' colors it red.
❓ selector
advanced1:30remaining
Which selector applies underline only to links inside a nav element?
You want to underline only <a> elements inside a <nav> element. Which CSS selector is correct?
Attempts:
2 left
💡 Hint
Think about the order and relationship of elements in selectors.
✗ Incorrect
The selector 'nav a' targets all anchor tags inside any nav element, applying underline only there.
❓ accessibility
expert2:00remaining
Why should you avoid using only 'text-decoration: none' on links for accessibility?
Removing underlines from links with 'text-decoration: none' can cause what accessibility issue?
Attempts:
2 left
💡 Hint
Think about how people visually identify links.
✗ Incorrect
Underlines are a common visual cue for links. Removing them without other cues can confuse users, especially those with visual impairments.