Working with Links - What Is the Difference Between Slashes, a Single Dot, and Double Dot in Path Syntax?

Tell us what’s happening:

"Which option is an absolute path?

/public/styles.css
./script.js
../src/nav.html
xhttps://freecodecamp.org

Incorrect.

An absolute path starts with a slash."

I know I have answered the question correctly. But I am told: “Incorrect.
An absolute path starts with a slash.”
Yes, I get that in the context of “Slashes, a Single Dot, and Double Dot in Path Syntax” we are looking for a path that starts with a slash.

However, according to the previous lesson, technically, “https://freecodecamp.org” is also a direct path.
Maybe we need to rephrase the question, or change the answer to something like https:\freecodecamp.org

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0

Challenge Information:

Working with Links - What Is the Difference Between Slashes, a Single Dot, and Double Dot in Path Syntax?
https://www.freecodecamp.org/learn/full-stack-developer/lecture-working-with-links/what-is-the-difference-between-slashes-a-single-dot-and-double-dot-in-path-syntax

1 Like

A domain is not an absolute path. A path to a file on that domain can be an absolute path though.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.