HTML - Don't laugh I'm a newbie.... linking question.?

Careless

New member
Joined
Nov 4, 2008
Messages
10
Reaction score
0
Points
1
Hi -

Because I've embedded galleries in 2 of my web pages, I was forced to put the files in folders outside the index.
For example, you have:
index.html
and in that folder you have a design folder & photo folder.
index.html links to design.html inside the design folder, and photo.html inside the photo folder.
Here's my question:
How do I link back to my index from photo.html or design.html?
I tried <a href="index.html">Home</a></h2> but it wont work.

is there a way to link backward one directory from the design folder?
THANK YOU!!!!
 
yes it's:

<a href="../index.html">Home</a></h2>


Here in this context the string (without the quotation marks) ".." means 'the previous directory (or folder) relative to the current directory of the file you are working on'.

When in doubt, you can also always hard code an absolute path (for example. http://mywebsite.com/folder1/image1.jpg) and there would be no confusion. The only trade off is if you change the location of your entire website then that path is no longer valid.
 
Open index.html
Copy everything in the address bar
Paste it in the <a href=" Here ">Home</a></h2>
 
Back
Top