Anchor Links and How to Create Them
When creating a website, occasionally there will be a need to hotlink to a file on the server. Hotlinking (or direct linking) is when a link uses the url to link, as apposed to linking to the directory relative to the file. An example of this is show in the following:
Link relative to the file location on the server:
<img src="/support/image.jpg" />
File Hotlinked or Directly linked to the server:
<img src="http://www.yourdomain.com/image.jpg" />
This is especially useful when using the Premium Web Builder. The Web Builder has the File download link; however, the problem with the File download link is that the file is accessible by everyone on the web. Hotlinking to the file allows the folder to be password protected, preventing people from accessing the file. This is common for those selling books in PDF format that only want people who paid for the book to download it. Lets learn how to directly link a file to the website.
In this tutorial, a .jpg image will be uploaded to the myimage directory. If there is no directory to upload the file to, create the directory and upload the file there. Upload the file to the folder.
For information on how to upload files through the cpanel File Manager click here
Visit the file through the browser by going to:
http://yourdomainname.com/foldername/filename.fileWhere the "foldername" is replaced with the folder name on your server and the "filename.file" is replaced with the file that was uploaded to that directory.
The url can be used in anchors, images, and other HTML tags where files can be linked to. Below are some examples of code that can be used.
We value your feedback!
new! - Enter your name and email address above and we will post your feedback in the comments on this page!
|1.||Using the anchor tag to create links|
|2.||Creating an Email Link in your Webpage|
|3.||Opening a new window with a link|
|4.||Anchor Links and How to Create Them|
|5.||Hotlink or Direct link to files on the server|