HTML and CSS Reference
In-Depth Information
Unlike with the
anchor
element, a browser does not indicate the linked sub-
areas of an image. he map and area elements are explained in the section
“Inline Images.”
he URL format permits almost any resource on the Internet to be addressed,
whether that resource is an HTML ile on a web server or another Internet
resource, such as a ile on an FTP server. he URL has several parts, not all
of which are required for the URL to be valid. In order of appearance, they
specify the following:
1
he
protocol
method to be used to access the resource
2
A
username
if the resource requires authentication
3
he
hostname
of the server providing the resource
4
A
port
number to be used on the server
5
he directory
path
to the resource
6
he
ilename
of the resource
7
he
anchor
name or ID of an element in the HTML document
8
Parameters
to be passed to the resource
Various delimiters separate the parts, as follows:
protocol
://
username
@
hostname
:
port
/
path
/
filename
#
anchor
?
parameters
he method for accessing resources on ordinary web servers is
http
, which
stands for Hypertext Transport Protocol. Secure web servers are accessed with
the
https
method. Other protocol methods access Internet services other than
the Web.
he
ile
protocol method is used to access resources on the local computer.
his is the implied protocol when using the Open command on the browser's
File menu. he username, hostname, and port parts of the URL are not used
with the
ile
protocol. he
ile
protocol method should never be used in a web
page on a remote web server.
he
mailto
protocol method signals that the browser should open a new
message in the user's email client. he recipient's email address comes imme-
diately ater the colon
(:)
following the protocol. For example: