+ 3
Relative Paths - index.html - /graphics/image.png Absolute Paths - http://www.mysite.com - http://www.mysite.com/graphics/image.png The first difference you'll notice between the two different types of links is that absolute paths always include the domain name of the website, including http://www., whereas relative links only point to a file or a file path. When a user clicks a relative link, the browser takes them to that location on the current site. For that reason, you can only use relative links when linking to pages or files within your site, and you must use absolute links if you're linking to a location on another website. You would use the following code to create a link in HTML: <a href="linkhere.html">Click Me</a> This link points to a filename, with no path provided. This means that linkhere.html is located in the same folder as the page where this link appears. If both files were located in the root directory of the Website http://www.website.com, the actual website address the user would be taken to is http://www.website.com/linkhere.html. If both files were located in a subfolder of the root directory called files, the user would be taken to http://www.website.com/files/linkhere.html. How about another example? Let's say we our http://www.website.com domain had a subfolder called pictures. Inside the pictures folder is a file called pictures.html. The full path to this page would be: - Dumitru If this answer has helped you, give it a upvote by pressing the button that looks like an thumbs up (like).
11th Aug 2016, 9:21 AM
Dumitru Comarnitchi
Dumitru Comarnitchi - avatar