Which is the right/best tag to use in my HTML file when I want to display the Adobe PDF viewer?
Right now I'm using the code below, but there are weird side effects (e.g. it seems to steal the starting focus that I've set to another <input>
text box; it doesn't seem to play real well with the jQueryUI Resizeable class; etc.)
<embed src="abc.pdf" type="application/pdf" />
Could I even do the same thing with the <object>
tag? Are there advantages/disadvantages to using one tag vs. the other?
OBJECT vs. EMBED - why not always use embed?
object
is the current standard tag to embed something on a page.embed
was included by Netscape (alongimg
) before anything likeobject
were on the w3c mind.This is how you include a PDF with
object
:If you really need the inline PDF to show in almost every browser, as older browsers understand
embed
but notobject
, you'll need to do this:This version does not validate.