Add a canvas for scripted graphics.
Acceptance criteria
- 1.Add a canvas for scripted graphics.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <applet> 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: “The tag in HTML was used to embed Java applets (small Java programs) into a web page. Applets could display interactive graphics, animations, or run other Java-based functionalities directly within the browser. However, the tag is deprecated in HTML5 and should no longer be used — it has been replaced by the or tag.” .
1.Use a canvas insteadexercise · easy · 10 min
Add a canvas for scripted graphics.
Passes when: Add a canvas for scripted graphics.
2.Use a video insteadexercise · easy · 10 min · practice plan
Play media with the video element.
Passes when: Play media with the video element.
3.Use an iframe insteadexercise · easy · 10 min · practice plan
Embed another page with an iframe.
Passes when: Embed another page with an iframe.
4.Add fallback contentexercise · easy · 10 min · practice plan
Give the canvas a message for unsupported browsers.
Passes when: Give the canvas a message for unsupported browsers.
5.A modern interactive areaexercise · medium · 10 min · practice plan
Build a sized, labelled canvas with fallback text.
Passes when: Build a sized, labelled canvas with fallback text.
6.Fix the applet elementbug fix · easy · 8 min
applet was removed; scripted graphics use canvas.
Passes when: applet was removed; scripted graphics use canvas.
7.Fix the plugin used for mediabug fix · easy · 8 min · practice plan
Video plays with the video element.
Passes when: Video plays with the video element.
8.Fix the plugin used to embed a pagebug fix · easy · 8 min · practice plan
Another HTML page belongs in an iframe.
Passes when: Another HTML page belongs in an iframe.
9.Fix the canvas with no fallbackbug fix · easy · 8 min · practice plan
Nothing is shown if canvas is unsupported.
Passes when: Nothing is shown if canvas is unsupported.
10.Fix the unlabelled canvasbug fix · easy · 8 min · practice plan
A canvas conveys nothing to a screen reader without a label.
Passes when: A canvas conveys nothing to a screen reader without a label.
Between them these tasks cover Removed elements, Modern alternatives and Canvas and video.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.