HTML and CSS Reference
Q: What is important about the
A: The absolute path is what a server
needs to locate the file you are requesting.
If the server didn't have an absolute path, it
wouldn't know where to look.
Q: I feel like I understand the pieces
(protocols, servers, websites, and
absolute paths), but I'm having trouble
A: If you add all those things together,
you have a URL, and with a URL you can
ask a browser to retrieve a page (or other
kinds of resources) from the Web. How? The
protocol part tells the browser the method
it should use to retrieve the resource (in
most cases, this is HTTP). The website
part (which consists of the server name and
the domain name) tells the browser which
computer on the Internet to get the resource
from. And the absolute path tells the server
what page you're after.
Q: We learned to put relative paths
in the href attribute of our <a> elements.
How can the server find those links if
they aren't absolute?
A: Wow, great question. When you click
on a link that is relative, behind the scenes
the browser creates an absolute path out of
that relative path and the path of the page
that you click on. So, all the web server ever
sees are absolute paths, thanks to your
Q: Would it help the browser if I put
absolute paths in my HTML?
A: Ah, another good question, but hold
that thought—we'll get back to that in a sec.
You've waited long enough. It's time to give your new URL a spin. Before you do, fill
in the blanks below and then type in the URL (like you haven't already). If you're
having any problems, this is the time to work with your hosting company to get
things sorted out. If you haven't set up an hosting company, fill in the blanks for
www.starbuzzcoffee.com, and type the URL into your browser anyway.