Path supported by HTML?
By Anil Pappachan
In my HTML test, There was the below question.What is this supported path means????
Which of the following path is supported by HTML?
1)
Ralative
2)
At the end of the document
3)
Defererenced
4)
Absolute and Relative
Douglas G Wolfe replied to Anil Pappachan Thursday, March 04, 2010
Hi Anil, Basically html supports two main paths, relative and absolute. This is referring to the urls used in anchor and image tags. An absolute link or url has the complete web address such as:
http://www.somesite.com/images/image1.jpg
Now that same url in a relative link wouldlook like this:
/images/image1.jpg
A relative link looks in the folder or directory that the code it is written in resides. such as in the above example the somesite.com is the root folder or root directory of this site so that any relative link in code within this directory will automatically look within this directory for whatever is being linked to. Meaning that it will already look in http://www.somesite.com thus you can use a relative link by just adding the rest of the url such as /images/image1.jpg
However you should b careful when using relative links, especially if the link will be used on multiple pages in multiple directories.
I hope this helps explain it a bit. If you are still confused please let me know and we can get together for an in depth discussion.
Douglas