URL stands for Uniform Resource Locator. The full address of a website is expressed through URL. Basically the web document located on the server is identified through the URL. For example, the image named 123.jpg of the user xyz located on Facebook is identified through the URL https://www.facebook.com/xyz/123.jpg, so when a user clicks on this link, he / she will directly see the image.
Parts of URL:
1) http = protocol
2) www = host
3) facebook = domain name
4) .com = domain type
5) xyz = directory
6) 123.jpg = web document
There are two types of URL. 1) Absolute URL and 2) Relative URL
Absolute URL: Such URLs contain both the domain name and the directory path. Absolute URL is usually used to create external connection of website.
Syntax: protocol/domain name/path
Relative URL: Such URLs contain only the directory path without the domain name. Relative URL is usually used to create internal connection of website.
Syntax: "filename.ext" / ". /directory/filename.ext"
Example:
<img src= "c:\desktop\new folder/123.jpg">
Here the Absolute URL is applied inside the image tag.
<img src= "123.jpg">
Here the Relative URL is applied inside the image tag.
Assessment:
Copy any URL and mark it separately in different parts and comment it.
