Challenge - 5 Problems
Line Breaks and Rules Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate2:00remaining
What is the visual output of this HTML snippet?
Look at this HTML code and choose what you will see in the browser.
HTML
<p>Hello<br>World</p>
Attempts:
2 left
💡 Hint
The
tag creates a line break inside text.
tag creates a line break inside text.
✗ Incorrect
The
tag forces the text after it to start on a new line, so Hello and World appear on separate lines.
tag forces the text after it to start on a new line, so Hello and World appear on separate lines.
📝 Syntax
intermediate2:00remaining
Which option correctly adds a horizontal rule in HTML?
Choose the correct HTML tag that creates a horizontal line across the page.
Attempts:
2 left
💡 Hint
The horizontal rule tag is a self-closing tag with two letters.
✗ Incorrect
The
tag creates a horizontal line. Other tags like, , or do not exist in HTML.
tag creates a horizontal line. Other tags like
🧠 Conceptual
advanced2:00remaining
What is the difference between
and
in HTML?
and
in HTML?
Choose the option that best explains the difference between these two tags.
Attempts:
2 left
💡 Hint
Think about how text flows and how sections are separated visually.
✗ Incorrect
breaks text onto a new line without extra space, while
draws a horizontal line to separate content visually.
❓ accessibility
advanced2:00remaining
How should you improve accessibility when using
tags?
tags?
Which option is the best practice to make horizontal rules accessible to screen readers?
Attempts:
2 left
💡 Hint
Think about how screen readers understand page structure.
✗ Incorrect
Adding aria-label or role="separator" helps screen readers identify the
as a meaningful separator, improving accessibility.
as a meaningful separator, improving accessibility.
❓ selector
expert2:00remaining
Which CSS selector targets only
elements inside paragraphs?
elements inside paragraphs?
Choose the CSS selector that applies styles only to
tags that are inside
tags that are inside
tags.
Attempts:
2 left
💡 Hint
Think about descendant selectors versus child selectors.
✗ Incorrect
The selector 'p br' targets all
elements inside any
elements inside any
, at any depth. 'p > br' targets only direct children, but
is usually inline and direct child, so both might work but 'p br' is more general and correct. 'br p' is invalid because
cannot be inside
. 'p + br' targets a
immediately after a
sibling, which is different.