HTML Responsive Design — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the HTML Responsive Design 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
Let images scale down
easy10 minAdd a class so the image can shrink with its container.
- 2
Make an image responsive
easy10 minAdd srcset with two widths and a sizes hint.
- 3
Swap art by width
easy10 minUse picture with a media-conditioned source.
- 4
Use a semantic wrapper
easy10 minWrap the page content in a main element.
- 5
Build a responsive header
medium10 minCombine a semantic header, nav and a fluid logo image.
Find the bug(5)
- 1
Fix the image that cannot shrink
easy8 minA fixed pixel width stops the image scaling on small screens.
- 2
Fix the fixed-width wrapper
easy8 minA hard-coded container width defeats responsiveness.
- 3
Fix the fixed image width
easy8 minA hard-coded width attribute stops the image scaling down.
- 4
Fix the nav built from spans
easy8 minNavigation entries should be real links inside a nav.
- 5
Fix the div wrapper
easy8 minThe main content should use the main element.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace