They consist of four parts:
- Document or location type ( http:// )
- Host/server name ( www.bsimple.org )
- Path name ( /learnhtml/chap4/ )
- File name ( 2.html )
The document type tells your browser what to expect when it contacts the remote computer. The primary types are:
- http
- Files on a World Wide Web server, using the HyperText Transfer Protocol.
- gopher
- Files on a gopher server. Gopher is a text-based document distribution system which was once common on the Internet.
- ftp
- Files on an ftp server using the File Transfer Protocol. This is a system of distributing files to be downloaded to your local computer.
- news
- Files on a Usenet news group server.
- telnet
- A telnet connection to a remote computer.
- file
- A file on your local computer.
The host or server name is the name of the remote computer you will be contacting. This is a standard type of internet address; in the case of World Wide Web servers, the name often (but not always) begins with www. The end of this name tells you something about the type of location:
- .edu
- Higher education institutions.
- .com
- Commercial businesses.
- .org
- Non-commercial organizations.
- .net
- Networking services companies.
- .gov
- Federal government agencies.
- .mil
- Military.
For international locations, this 3-letter type is followed by a 2-letter country code (such as ca for Canada).
The final two parts of the URL are the path name and file name. These identify the specific document you would like to view. In some cases, the file name may be omitted. The browser would then retrieve the default file in that directory. The name of this file can differ depending on the type of WWW server being used. In most cases, default file names for a directory include index.html (or .htm), home.html, or default.html.
Let's practice adding some absolute links to your second sample document. Switch back to Notepad and add the following at the end of the document:
