Embed the sample PDF.
Acceptance criteria
- 1.Embed the sample PDF.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <embed> 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 is used to embed external content such as videos, audio, PDFs, or interactive media (like SVGs or Flash) directly into a webpage. It is a self-closing tag and doesn’t require a closing tag. It serves as a generic container for external resources when specific tags (like or ) are not suitable.” .
1.Embed a fileexercise · easy · 10 min
Embed the sample PDF.
Passes when: Embed the sample PDF.
2.Declare the typeexercise · easy · 10 min · practice plan
Tell the browser what kind of file it is.
Passes when: Tell the browser what kind of file it is.
3.Size the embedexercise · easy · 10 min · practice plan
Give the embedded content a width and height.
Passes when: Give the embedded content a width and height.
4.Title the embedexercise · easy · 10 min · practice plan
Give it an accessible title.
Passes when: Give it an accessible title.
5.A fully described embedexercise · medium · 10 min · practice plan
Embed a sized, typed and titled file.
Passes when: Embed a sized, typed and titled file.
6.Fix the wrong attribute for the filebug fix · easy · 8 min
An embed points at its file with src.
Passes when: An embed points at its file with src.
7.Fix the missing typebug fix · easy · 8 min · practice plan
Without a type the browser must guess.
Passes when: Without a type the browser must guess.
8.Fix the size set only in CSSbug fix · easy · 8 min · practice plan
Give the embed real width and height attributes.
Passes when: Give the embed real width and height attributes.
9.Fix the untitled embedbug fix · easy · 8 min · practice plan
Assistive technology needs to know what it holds.
Passes when: Assistive technology needs to know what it holds.
10.Fix the image element used to embed a pagebug fix · easy · 8 min · practice plan
An img cannot embed a document.
Passes when: An img cannot embed a document.
Between them these tasks cover External content, type attribute and Dimensions.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.