How to add the file reference

How to add the file reference

Often it is necessary to give the chance to visitors of the website not only to browse pages and images, but also to download files of different formats - archives, musical files, documents and video files. Learn to put down on pages of the website of the link to files it is possible also without deep immersion in this programming language.

It is required to you

  • - access to management of the website on ftp or via the control panel;
  • - files for loading;
  • - program for editing HTML pages, rather standard Notepad.

Instruction

1. Create in a website root the folder into which you will load further files on which you are going to add references. Call it for convenience of recognition of ""download"" - it is the standard name for a directory of storage of files on the server.

2. Load into the download folder files on which you are going to put down links on the website. For an example we will load into it files: example.pdf - a document file, example.rar - the file of archive, example.avi - the video file.

3. Create in a body of the edited page the hypertext link to the homepage of the website (you can specify any page, not necessarily main as all of us will equally edit this link), call it, for example, "download the file". If you created the reference in the visual editor of the control panel of the website, then having opened the code of the page in the text editor, you will see in that place where the link the code like it is inserted: [a href= ""index.html""] download the file [/a]

4. Replace the code which is in double quotes (in our case with ""index.html"") with following: ""http://vash-site.ru/download/example.pdf"". The changed type of the code - [a href= ""http://vash-site.ru/download/example.pdf""] to download the file [/a]. Now the visitor, having clicked on the link ""download the file"", will be able to download the document ""example.pdf"".

5. Similarly make replacement for other files: vash-site.ru/download/example.rar, - the visitor will be able to download example.rar archive, vash-site.ru/download/example.avi, - the visitor will be able to download and watch the video file ""example.avi"

Author: «MirrorInfo» Dream Team


Print