Break this block of text into three separate <p> elements, one per idea.
Acceptance criteria
- 1.Add at least three paragraphs.
HTML Tutorial · HTML Basics
These 10 tasks go with the HTML Paragraphs chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 110 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “Paragraphs are the foundation of text content on any webpage. In HTML, the <p> tag is used to define a paragraph — separating blocks of text and improving readability for both users and browsers.” .
1.Write three separate paragraphsexercise · easy · 10 min
Break this block of text into three separate <p> elements, one per idea.
Passes when: Add at least three paragraphs.
2.Break a line inside a paragraphexercise · easy · 10 min · practice plan
Write a paragraph containing a mailing address on two lines, using <br> to force the line break without starting a new paragraph.
Passes when: Add a <br> inside the paragraph.
3.Separate sections with a thematic breakexercise · easy · 10 min · practice plan
Add an <hr> between the two paragraphs below to mark a change of topic.
Passes when: Add an <hr> between the paragraphs.
4.Preserve formatting with <pre>exercise · easy · 10 min · practice plan
Show the code snippet "const x = 1;" exactly as written, preserving its spacing, using a <pre> element.
Passes when: Add a <pre> element; Include the exact code snippet.
5.Lead with a strong opening wordexercise · medium · 15 min · practice plan
Write a paragraph that starts with the word "Note:" wrapped in <strong>, followed by the rest of the sentence: "check your work before submitting."
Passes when: Wrap the sentence in a paragraph; Wrap "Note:" in <strong>; Include the rest of the sentence.
6.Fix the single wall of textbug fix · easy · 10 min
Everything is crammed into one paragraph. Split it into three separate <p> elements, one per sentence.
Passes when: Split the text into three paragraphs.
7.Fix the address squished onto one linebug fix · easy · 10 min · practice plan
This address has no line break, so the street and city run together. Add a <br> so the city starts on its own line.
Passes when: Add a <br> inside the address paragraph.
8.Fix the missing thematic breakbug fix · easy · 10 min · practice plan
Add the <hr> that's missing between these two unrelated sections.
Passes when: Add the missing <hr>.
9.Fix the code snippet that lost its formattingbug fix · easy · 10 min · practice plan
This code snippet is in a plain <p>, so its spacing collapses. Move it into a <pre> element instead, keeping the exact text "const x = 1;".
Passes when: Use a <pre> element for the code; Keep the exact code text.
10.Fix the wrong reminder textbug fix · medium · 15 min · practice plan
The reminder paragraph has the wrong wording. Fix the sentence after "Note:" to read exactly "check your work before submitting."
Passes when: Fix the reminder text.
Between them these tasks cover HTML Paragraphs.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.