How To Add A Link To A File

Table of contents:

How To Add A Link To A File
How To Add A Link To A File

Video: How To Add A Link To A File

Video: How To Add A Link To A File
Video: email link to file on shared drive 2024, May
Anonim

It is often necessary to enable website visitors not only to view pages and images, but also to download files of various formats - archives, music files, documents and video files. You can learn how to put links to files on site pages without deep immersion in this programming language.

How to add a link to a file
How to add a link to a file

It is necessary

  • - access to site management via ftp or through the control panel;
  • - files to download;
  • - a program for editing html-pages, just a standard Notepad.

Instructions

Step 1

Create a folder in the root of the site where you will later upload the files to which you are going to add links. Name it for ease of recognition "download" is the common name for the directory where files are stored on the server.

Step 2

Upload the files to the download folder that you are going to link to on the site. For example, let's load files into it: example.pdf - document file, example.rar - archive file, example.avi - video file.

Step 3

Create in the body of the edited page a hypertext link to the main page of the site (you can specify any page, not necessarily the main one, since we will still edit this link), name it, for example, "download file". If you have created a link in the visual editor of the site control panel, then by opening the page code in a text editor, you will see in the place where the link is inserted a code like this: [a href = "index.html"] download file [/a]

Step 4

Replace the code in double quotes (in our case "index.html") with the following: "https://vash-site.ru/download/example.pdf". Changed code view - [a href = "https://vash-site.ru/download/example.pdf"] download file [/a]. Now the visitor, by clicking on the "download file" link, will be able to download the "example.pdf" document.

Step 5

Similarly, replace the rest of the files: vash-site.ru/download/example.rar, - the visitor will be able to download the archive "example.rar", vash-site.ru/download/example.avi, - the visitor will be able to download and watch the video file "example.avi"

Recommended: