freecoding.school100% FREE · NO SIGNUP
Input HarborISSUE #25 of 46

plug-ins · object · embed · why they're rare now

FormaVSCaptain Invalid Input
Forma says<object> and <embed> embed external resources like PDFs — relics of the plugin era, mostly replaced today.

<object> and <embed> were how pages embedded Flash, Java applets, and other plugin content. Plugins are dead, but <object data="file.pdf"> still works for inline PDFs, and <embed> survives for similar cases.

For almost everything modern, prefer purpose-built elements — <video>, <audio>, <img>, <iframe>. Reach for object/embed only when you genuinely need to drop in a PDF or a legacy format.

Power-ups you unlock

Captain Invalid Input attacks — common mistakes

Boss battleEmbed a PDF with <object data="file.pdf" type="application/pdf"> and provide a download link as fallback content.

Example code

<!doctype html>
<html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;padding:20px">
  <object data="sample.pdf" type="application/pdf" width="100%" height="300">
    <p>can’t display the PDF — <a href="sample.pdf" style="color:#b388ff">download it</a> instead.</p>
  </object>
</body></html>
▶ Open the interactive comic issue
‹ Audio · Formats · StreamingYoutube · Iframe Embeds ›