From the course: HTML for Educators

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Linking to a PDF

Linking to a PDF - HTML Tutorial

From the course: HTML for Educators

Start my 1-month free trial

Linking to a PDF

- [Instructor] To create a link to a PDF file, you set the target of the link to the relative or absolute location of the PDF file. Then, you can decide if you want the PDF file to be displayed to your learner or have it downloaded to their device. I'm in syllabus.html, and inside of my local site, I've created a folder called resources, where I have a PDF version of the syllabus called syllabus.pdf. Near the top of the syllabus, we offer our students access to a PDF copy that they can either view in their browser or download to their device. Let's first create a relative link to the PDF and use the text view as our label. Create an opening anchor tag and then set the href attribute equals to quotes the relative path to the file. Since we've grouped our PDF files in a folder called resources, we need to start with the name of the folder and then a forward slash and then the name of the PDF file, which is syllabus.pdf. Close the quotes and then close the tag. Since most browsers will…

Contents