I’m running into some confusion about linking to a relative path.
In Introduction to HTML // Linking to a Relative Page Lesson 8
It says, “The “./“ in “./index.html” tells the browser to look for the file in the current folder.”
Then in Learn CSS: Typography // Font Face III Lesson 18
The src: url is src: url(…/fonts/Glegoo-Regular.ttf)
As shown above, the answer requires two periods before the backslash in front of “fonts” like this:
I don’t understand why.
Lastly in Learn CSS: Typography // Typography
In the YouTube video CSS Project Typography 8:36
The src: url is src: url (“fonts/CroissantOne-Regular.ttf”)
Before “fonts” there is no “./“ or “…/“ like in the previous lessons.
The is also no format property in the YouTube video.
The questions I have are as follows:
- Out of the three options “./“, “…/“ or no preceding marks, which do I use in what situation?
- Do I have too use the “format” property? If so, when?