HTML Block vs Inline Elements — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the HTML Block vs Inline Elements lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Use a block element
easy10 minAdd a div containing a paragraph.
- 2
Use an inline element
easy10 minHighlight a word inside a paragraph with a span.
- 3
Nest inline inside block
easy10 minPut a strong element inside a paragraph.
- 4
Use a list as a block
easy10 minAdd a ul with two items.
- 5
Combine block and inline
medium10 minAdd a section with a paragraph containing a link.
Find the bug(5)
- 1
Fix the block inside a paragraph
easy8 minA div cannot live inside a paragraph.
- 2
Fix the span used as a container
easy8 minA layout wrapper should be a block element.
- 3
Fix the div used for emphasis
easy8 minInline emphasis belongs in a span or strong.
- 4
Fix the list items in a div
easy8 minList items need a real list parent.
- 5
Fix the link wrapping a section
easy8 minKeep the link inline inside the paragraph.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace