0
0
HTMLmarkup~20 mins

Paragraphs in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Paragraph Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2: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>
AOne continuous line of text without breaks.
BTwo lines of text with no space between them.
CText displayed in bold and italic style.
DTwo separate blocks of text with space between them.
Attempts:
2 left
💡 Hint
Remember, paragraphs create blocks with space above and below.
🧠 Conceptual
intermediate
1:00remaining
Which HTML tag is used to create a paragraph?
Choose the correct HTML tag that defines a paragraph.
A<section>
B<span>
C<p>
D<div>
Attempts:
2 left
💡 Hint
Paragraphs are blocks of text, not inline or container elements.
📝 Syntax
advanced
2: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>
AThe browser merges both paragraphs into one block.
BBoth paragraphs display correctly with space.
CThe browser ignores the second paragraph completely.
DThe browser shows a syntax error message.
Attempts:
2 left
💡 Hint
Browsers try to fix missing closing tags automatically.
accessibility
advanced
1:30remaining
How to improve accessibility for paragraphs?
Which practice helps screen readers understand paragraphs better?
AUse semantic &lt;p&gt; tags for paragraphs.
BAvoid using paragraphs and write all text inline.
CUse &lt;div&gt; tags with CSS for spacing.
DUse multiple &lt;br&gt; tags instead of &lt;p&gt;.
Attempts:
2 left
💡 Hint
Semantic tags give meaning to content for assistive tools.
layout
expert
2: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;
}
A1rem space between paragraphs.
B2rem space between paragraphs.
C3rem space between paragraphs.
DNo space between paragraphs.
Attempts:
2 left
💡 Hint
Vertical margins between adjacent block elements collapse to the maximum value.