How to Display a PDF File in a HTML Web Page

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Display PDF files within your readers' Web browsers.

Using hyperlinks on your Web page you can easily display Word documents, images, Flash movies and even PDF documents. Quickly and easily use simple HTML code to link to a PDF document. Alternatively, you can embed a PDF in an HTML page.

Advertisement

Step 1

Save the PDF you wish to link to on a local drive on your computer.

Video of the Day

Step 2

Upload the PDF to your Web host. How this is done depends on your host. If you have any problems, check your host's FAQ or customer service. Take note of the path of the file.

Advertisement

Step 3

Type the following code to cause the PDF to display in a new window:

<a target="_blank" href="filename.pdf" title="">Text that appears to the user

Advertisement

If you do not wish the PDF to open in another window, then type:

Advertisement

<a href="filename.pdf" title=>Text that appears to the user

For "filename.pdf" substitute the filename and path of your PDF on the Web host, relative to the current HTML page. Include the quotes. For "Text that appears to the user," substitute the text you want to appear highlighted and clickable.

Video of the Day

Advertisement

Advertisement

references

Report an Issue

screenshot of the current page

Screenshot loading...