Computer >> Computer tutorials >  >> Programming >> Javascript

Is there any way to embed a PDF file into an HTML5 page?


To embed a PDF file in an HTML5 page, use the <iframe> element.

<!DOCTYPE html>
<html>
   <head>
      <title>HTML iframe Tag</title>
   </head>
   <body>
      <h1>HTML5 Tutorial</h1>
      <iframe src = " https://www.tutorialspoint.com/html5/html5_tutorial.pdf" style="width:500px; height:300px;"></iframe>
   </body>
</html>