Every website needs to reference certain resources, whether they’re images, files, or other web pages.

Deciding how to link to other files is extremely important to ensure that browsers locate them correctly.

you could link to resources using either a relative or absolute URL.

A close-up of a web browser showing a URL in the address bar

This applies to both local files on a computer and protocol-based URLs accessed over the web.

This is required if you are linking to an external site.

In the above example, to accessLogo.icofromindex.htmlusing a relative URL, you would use the path “Images/Icons/Logo.ico”.

Absolute URL of bird image

you might now take extra care to ensure your resources are always retrieved.

You should also always ensure that all links that your users can access are safe and secure.

New photo of bird stored in the file manager

Find absolute path in file manager

Absolute URL used to display bird image

HTML CSS folder path structure

Relative URL used to display bird image