HTML and CSS Reference
In-Depth Information
Going the other way; linking up into a “parent” folder
1
Linking from “directions.html” to “lounge.html”.
Now we need to fix those “Back to the Lounge” links. Here's what the
<a>
element looks like in the “directions.html” file:
Rig
ht no
w, we
're ju
st
usin
g th
e file
name
“lou
nge.ht
ml”,
which
tells
the
brow
ser t
o loo
k in
th
e sam
e fold
er as
“dir
ectio
ns.htm
l”. T
hat's
no
t goin
g to
work.
<a href="lounge.html">
Back to the Lounge
</a>
2
Identify the source and the destination.
Let's take a look at the
source and destination.
The source is now
the “directions.html”
file, which is down in
the “about” folder. The
destination is the
“lounge.html” file that sits
above the “about” folder,
where “directions.html”
is located.
…
and f
ind a
path
to he
re.
<html>
.
.
</html>
lounge
lounge.html
green.jpg
<html>
.
.
</html>
beverage
s
<html>
images
about
.
.
blue.jpg
</html>
drinks.gif
directions.html
elixir.html
lightblue.jpg
red.jpg
3
Trace a path from the source to the destination.
Let's trace the path.
To get from the
“directions.html” file to
“lounge.html”, we need to
go up one folder into the
“lounge” folder, and then
we'll find “lounge.html”
in that folder.
<html>
.
.
</html>
lounge
lounge.html
green.jpg
<html>
.
.
</html>
beverage
s
<html>
images
about
.
.
</html>
blue.jpg
drinks.gif
directions.html
elixir.html
First,
we n
eed t
o
go UP
into
the
“
lounge
” fol
der…
lightblue.jpg
red.jpg