Mark a break opportunity inside a long word.
Acceptance criteria
- 1.Mark a break opportunity inside a long word.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <wbr> 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: “Learn how the HTML <wbr> tag suggests optional line-break positions inside long words, URLs, and identifiers.” Read the chapter.
1.Allow a breakexercise · easy · 10 min
Mark a break opportunity inside a long word.
Passes when: Mark a break opportunity inside a long word.
2.Break a long URLexercise · easy · 10 min · practice plan
Add a break opportunity inside a long address.
Passes when: Add a break opportunity inside a long address.
3.Two opportunitiesexercise · easy · 10 min · practice plan
Add two break points in one long string.
Passes when: Add two break points in one long string.
4.Break inside a table cellexercise · easy · 10 min · practice plan
Add a break opportunity inside a narrow cell.
Passes when: Add a break opportunity inside a narrow cell.
5.A breakable identifierexercise · medium · 10 min · practice plan
Add break points to a long code identifier.
Passes when: Add break points to a long code identifier.
6.Fix the line break used to wrap a wordbug fix · easy · 8 min
A break opportunity is not a forced break.
Passes when: A break opportunity is not a forced break.
7.Fix the space added to break a URLbug fix · easy · 8 min · practice plan
A space changes the address; a wbr does not.
Passes when: A space changes the address; a wbr does not.
8.Fix the missing second break pointbug fix · easy · 8 min · practice plan
The string needs two opportunities, not one.
Passes when: The string needs two opportunities, not one.
9.Fix the break outside the cellbug fix · easy · 8 min · practice plan
The opportunity belongs inside the cell text.
Passes when: The opportunity belongs inside the cell text.
10.Fix the identifier with no break pointsbug fix · easy · 8 min · practice plan
The long name cannot wrap.
Passes when: The long name cannot wrap.
Between them these tasks cover Word break opportunities, Long strings and URLs.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.