| Creating Links |
URL stands for uniform resource locator. It is, simply put, an address that points the browser to the location of a specific file. It consists of the protocol, host name (domain name), directory, and filename. Examples:
An absolute pathname contains all the information (domain name, directories, and filename) of a URL. Use an absolute pathname for links to external documentsan HTML document that does not reside on your own Web site. Example: A relative pathname contains only information relative to the original file. Use a relative pathname for internal documentsan HTML document that resides on your own Web site. Example:
<a href="protocol://domain.name/directory/filename">Name of the Link</a> Example Code:<a href="http://www.yahoo.com">External Link</a> The Result:
<a href="filename">Name of the Link</a> Example Code:<a href="internal.html">Internal Link</a> The Result:
A link to another HTML document, by default, brings us to the top of the HTML document. An anchor allows you to create an internal link to a specific location within an HTML document. The Anchor: The Link to the Anchor: <a href="internal.html#Anchor2">Internal Link to the Anchor</a> The Result:
|
|
|
| XHTML
Basics Workshop © 1996-2005 |