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

This community-built FAQ covers the “Linking to Relative Page” exercise in Codecademy’s lessons on HTML.

The most popular questions on the exercise Linking to Relative Page:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about HTML in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!

1 Like

Other FAQs

The following are links to additional questions that our community has asked about this exercise:

Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).

1 Like

2 posts were split to a new topic: What are the advantages of using relative paths?

2 posts were split to a new topic: What is the nav element?

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.

2 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