HTML and CSS Reference
In-Depth Information
<a href=""
title="Request for information"> Email Us </a>!
In addition, there are a number of special browser protocol methods.
Replacing http or https with view-source causes most browsers to display the
HTML source code of a Web resource. he javascript protocol, followed by a
valid JavaScript expression ater the colon, causes the browser to execute that
expression. For example, type the following into a browser's location window
and press Enter:
he port number is the server's version of a telephone extension number.
he default is port 80 for the http protocol. Most websites are accessible on
that port, so it rarely needs to be entered. Secure servers use a diferent default
To link to another HTML document in the same directory as the current
one, only the ilename is needed. A user agent ills in the missing informa-
tion from the current document's URL before sending the request to the web
server. his is called relative URL addressing , and it is the preferred way to
write hyperlinks in documents that reside within the same website. he fol-
lowing example provides a link to the ile spotdata.html:
Data has a cat named <a href="spotdata.html"> Spot </a> .
Relative addressing makes a website portable. As long as the iles reside in
the same logical directory, none of the relative links need to be updated when
the collection is moved to another server or domain. To link to a speciic place
in the destination page, follow the ilename with a pound sign (#) and the id of
the HTML element that corresponds to that place in the destination page:
<a href="spotdata.html#habits"> Spot </a>
If the ile is in a subdirectory of the directory containing the current ile, the
anchor element's link to the preceding ile would be written like this:
<a href="pets/spotdata.html"> Spot </a>
he double-dot (../) shorthand can be used to write a link to a resource in
the parent directory of the current ile:
<a href="../officers/"> List of Officers </a>
Search WWH ::

Custom Search