FAQ: Learn HTML - Common HTML Elements - Linking to Relative Page

4 posts were split to a new topic: Is it necessary to use ./ to link local files?

2 posts were split to a new topic: This doesn’t appear as I expected

3 posts were split to a new topic: Why do we create a link to the page we are already in?

I’m trying to do the exercise for the relative path, it says put the index.html directly below the tag, and I did but it won’t proceed. I’m wondering if it’s a bug.

3 Likes

What is an absolute path? I see we relative paths are defined on this exercise, however absolute paths are not.

An absolute path refers to the complete details needed to locate a file or folder, starting from the root element and ending with the other subdirectories

A post was split to a new topic: Error in Step 1 directions?

When opened the aboutme.html tab, I can see < br /> inside < p > tag. How’s it different than < br >? or are they the same thing?

<p> is a proper box element while <br> is a quick and dirty line break. They are not the same thing.

What @stetim94 said, or do you mean the difference between <br> and <br />?

<br> is HTML, whereas <br /> is XHTML, which is based on XML syntax, if I’m not mistaken.

You can simply use <br>.

1 Like

Hey thanks for replying, but what i meant was “are < br > & < br / > the same?”

When linking to a relative path using anchor elements, is the name of the html file I am linking to derived from what was written in the title element in the head of that html file? If not, how does the html file get named? I ask because in for e.g the html file aboutme.html shown in this exercise, there is no space between the words ‘about’ and ‘me’, and I’d assume that the title of that page would include a space between those words.

Why web browsers respond to index.html and / the same way?

A convention agreed upon.

Can you show how to get to file location manually? And are all files store in root directory?

you could use a program (the standard file explorer in Windows for example) to get the full path, just select the address bar. Windows should give you the full path

On windows? No. Windows uses a slightly different system

in *nix systems? Yes. root is the top of the tree (lol, sorry, couldn’t resist).

2 Likes

what is difference between relative path and absolute path? pls explain

relative path is a path from the current working directory to another directory/file.

an absolute path starts at c:/ or d:/ (windows) or the root directory (/) on unix based and derived systems.

2 Likes

thank you so much for beautiful explanation :smiley:

I had to reload the page and try again before it registered as correct.