How to display PDF file in HTML?

Spread the love

Sometimes, we want to display PDF file in HTML.

In this article, we’ll look at how to display PDF file in HTML.

How to display PDF file in HTML?

To display PDF file in HTML, we use the embed element.

For instance, we write

<embed src="file_name.pdf" width="800px" height="2100px" />

to add an embed element with the src attribute set to the URL of the PDF to show.

We also set its width and height to make it show.

Conclusion

To display PDF file in HTML, we use the embed element.

Leave a Reply

Your email address will not be published. Required fields are marked *