Split a line of text with a break.
Acceptance criteria
- 1.Split a line of text with a break.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <br> Tag 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 90 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: “is a line break: the text after it starts on the next line, inside the same paragraph. It is for content where the line breaks are part of the content — a postal address, a poem, lyrics. It is not for making space between things.” .
1.Break a lineexercise · easy · 10 min
Split a line of text with a break.
Passes when: Split a line of text with a break.
2.An address blockexercise · easy · 10 min · practice plan
Write a two-line address using a break.
Passes when: Write a two-line address using a break.
3.Two breaksexercise · easy · 10 min · practice plan
Write three lines inside one paragraph.
Passes when: Write three lines inside one paragraph.
4.Break inside a list itemexercise · easy · 10 min · practice plan
Put a break inside a list item.
Passes when: Put a break inside a list item.
5.A short verseexercise · medium · 10 min · practice plan
Write four lines separated by breaks.
Passes when: Write four lines separated by breaks.
6.Fix the paragraph split for a line breakbug fix · easy · 8 min
A new line inside one idea is a break, not a new paragraph.
Passes when: A new line inside one idea is a break, not a new paragraph.
7.Fix the missing breakbug fix · easy · 8 min · practice plan
The two lines run together.
Passes when: The two lines run together.
8.Fix the wrong element for a breakbug fix · easy · 8 min · practice plan
A horizontal rule is not a line break.
Passes when: A horizontal rule is not a line break.
9.Fix the missing second breakbug fix · easy · 8 min · practice plan
Three lines need two breaks.
Passes when: Three lines need two breaks.
10.Fix the break outside the list itembug fix · easy · 8 min · practice plan
The break should be inside the item.
Passes when: The break should be inside the item.
Between them these tasks cover Line breaks, Addresses and Poetry.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.