Challenge - 5 Problems
CSS Styling Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Difference in CSS application methods
Which CSS method applies styles directly inside an HTML tag and overrides other styles?
Attempts:
2 left
💡 Hint
Think about where the style is written closest to the element itself.
✗ Incorrect
Inline CSS is written inside the HTML element's style attribute, so it has the highest priority and overrides internal and external styles.
📝 Syntax
intermediate2:00remaining
Correct syntax for internal CSS
Which option shows the correct way to write internal CSS inside an HTML document?
CSS
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Test</title> <!-- CSS goes here --> </head> <body> <p>Hello World</p> </body> </html>
Attempts:
2 left
💡 Hint
Internal CSS uses <style> tags inside the <head>.
✗ Incorrect
Internal CSS is placed inside <style> tags within the <head> section. Option B correctly shows this.
❓ rendering
advanced2:00remaining
Visual result of conflicting CSS styles
Given this HTML and CSS, what color will the paragraph text be when rendered in the browser?
HTML:
<p style="color: green;">Hello</p>
Internal CSS:
<style> p { color: red; } </style>
External CSS:
/* styles.css */
p { color: blue; }
Attempts:
2 left
💡 Hint
Remember the priority order: inline > internal > external.
✗ Incorrect
Inline CSS has the highest priority, so the paragraph text will be green as set by the inline style.
❓ selector
advanced2:00remaining
Which CSS selector applies styles only in external CSS?
You want to style all paragraphs with class "highlight" only using external CSS. Which selector should you use in your external stylesheet?
Attempts:
2 left
💡 Hint
External CSS uses selectors, not inline attributes.
✗ Incorrect
Option A is a valid CSS selector targeting paragraphs with class highlight in an external stylesheet.
❓ accessibility
expert3:00remaining
Accessibility impact of inline styles
Which statement about inline CSS and accessibility is true?
Attempts:
2 left
💡 Hint
Think about how style consistency affects users with screen readers or other aids.
✗ Incorrect
Inline CSS can cause inconsistent styling, making it harder for assistive technologies to interpret the page consistently.