An appropriate address is given in the form of a uniform resource locator (URL). The general form for a URL for an HTML file accessed via a network includes several parts:
http:
, specifies that the URL adheres to a scheme known as the hypertext transfer
protocol.
http:
specifier by two
slashes, specifies an Internet address, such as www.ascent.com
.
Such specifications consist of the name of the web-accessible computer, such as www
, and
the name of the domain
with which that computer is associated, such as ascent.com
,
separated by a period. Domain names usually consist of
organization names, such as ascent
, and types, such
as com
(or edu
, mil
, gov
, or org
)
separated by a period.
d:/InetPub/wwwroot/
, and you supply books/java/test.html
,
then
d:/InetPub/wwwroot/books/java/test.html
is the location of your file on the computer.
The followingwith all necessary syntaxillustrates what a URL typically contains:
*-- Scheme specifier | | *-- Computer name | | | | *-- Domain name | | | | | | *-- Relative path v v v v ----- --- ---------- -------------------- http://www.ascent.com/books/java/test.html ^ ^ ^ | | *-- Internet-address separator (/) | *-- Name separator (.) | *-- Scheme separator (//)
Note that the computer name used by many organizations for their web server
is, appropriately enough, www
but it can be any name.