From the course: CSS Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Relative and absolute paths

Relative and absolute paths - CSS Tutorial

From the course: CSS Essential Training

Start my 1-month free trial

Relative and absolute paths

- [Instructor] When building websites, it's common to link different files together, such as embedding an image, linking to a CSS file, or even another website. This can be done using a relative or absolute path. Relative paths are used to link to files within the same project. The path is determined by the file's location within the directory. In the course project, the link to the resume page from the homepage uses a relative path. Since the HTML files are in the same folder, the file path is just the file name. To link to a file contained in a folder, start the file path with the folder name followed by a slash and the file name. These paths are relative to their location in the directory, so if you move a file, you'll need to update the paths accordingly. File paths are also case sensitive, so if you have a folder named css with lowercase letters, and you reference it with uppercase letters, the link may not work.…

Contents