Home >> FAQs/Tutorials >> XHTML Tutorials and Tips >> Index
XHTML Tutorial - Relative Path Name of a URL
(Continued from previous topic...)
What Is a Relative Path Name?
A relative path name is a path name that starts without the leading slash "/".
If a relative path name is used in a URL, the relative path name will be
replaced with the current document path name appended with the specified relative
path name.
If "." or ".." is used in path names, it will be interpreted
as "current directory" or "parent directory" respectively.
For example, if the following URLs are used in this document
you are viewing right now:
./index.html
../index.html
../../index.html
../../faq/css/index.html
image/fyi.jpg
your browser will borrow the protocol name, the host name, the port number,
and the path name from the URL of this document, and produce the following URLs:
http://dev.fyicenter.com:80/faq/xhtml/index.html
http://dev.fyicenter.com:80/faq/index.html
http://dev.fyicenter.com:80/index.html
http://dev.fyicenter.com:80/faq/css/index.html
http://dev.fyicenter.com:80/faq/xhtml/image/fyi.jpg
(Continued on next topic...)
- What Are Hyper Links?
- What Is an Anchor "a" Tag/Element?
- How To Define a Hyper Link?
- How To Define a Bookmark?
- What Is a URL?
- What Is the Structure of a URL?
- What Happens If Protocol or Port Number Is Missing in a URL?
- What Happens If a URL Starts with Path or File name?
- What Is a Relative Path Name?
- What Happens If File Name is Missing in a URL?
- How To Build Hyper Link Indexes within the Same Document?
- What Happens If a Hyper Link Points to an Image?
- What Happens If a Hyper Link Points to a Music File?
- What Happens If a Hyper Link Points to a PDF File?
- What Happens If a Hyper Link Points to a ZIP File?
- How To Create A Link to Open a Document in a New Window?
|