Challenge - 5 Problems
Paragraph Pro
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>This is the first paragraph.</p> <p>This is the second paragraph.</p>
Attempts:
2 left
💡 Hint
Remember, paragraphs create blocks with space above and below.
✗ Incorrect
The <p> tag creates a block of text separated by space from other blocks. So two paragraphs show as two blocks with space between.
🧠 Conceptual
intermediate1:00remaining
Which HTML tag is used to create a paragraph?
Choose the correct HTML tag that defines a paragraph.
Attempts:
2 left
💡 Hint
Paragraphs are blocks of text, not inline or container elements.
✗ Incorrect
The <p> tag is the standard HTML element for paragraphs. <div> and <section> are container elements, <span> is inline.
📝 Syntax
advanced2:00remaining
What error does this HTML code cause?
Look at this code and select the error it causes in the browser.
HTML
<p>This is a paragraph. Another paragraph without closing the first.</p>
Attempts:
2 left
💡 Hint
Browsers try to fix missing closing tags automatically.
✗ Incorrect
Without closing the first <p>, the browser treats the text of the second paragraph as part of the first paragraph, merging them into one block.
❓ accessibility
advanced1:30remaining
How to improve accessibility for paragraphs?
Which practice helps screen readers understand paragraphs better?
Attempts:
2 left
💡 Hint
Semantic tags give meaning to content for assistive tools.
✗ Incorrect
Using <p> tags helps screen readers identify paragraphs, improving accessibility.
❓ layout
expert2:30remaining
How does CSS affect paragraph spacing?
Given this CSS, what is the vertical space between paragraphs?
HTML
p {
margin-top: 1rem;
margin-bottom: 2rem;
}Attempts:
2 left
💡 Hint
Vertical margins between adjacent block elements collapse to the maximum value.
✗ Incorrect
Each paragraph has 1rem top and 2rem bottom margin. Between two paragraphs, the bottom margin of the first (2rem) and top margin of the second (1rem) collapse to the maximum of 2rem.