| [main] [misc] [graphics] [page design] [site design] [xhtml] [css] [xml] [xsl] [schema] [javascript] [php] [mysql] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note that all external links will open up in a separate window. This is a stripped down version of these pages for older browsers. These pages are really meant to be viewed in a standards compliant browser. |
Writing the URLThese tutorials are about XHTML, the Extensible Hypertext Markup Language. The URLThe URL is called the uniform resource locator for a reason. It is a standard by which anything that can be addressed through the World Wide Web is assigned an address. All URLs take the form of: scheme:scheme_specific_information The scheme designates what kind of object is being referenced. The scheme_specific_information designates what object is being referenced. URLs occur in any mark-up tag that references another document or object. Image tags make use of URLs, as do hyperlinks and style sheet calls. For the most part, everything in a Web page that can reference another document, object, or anchor tag does so in the same way. Once you've got the hang of it, all you have to learn is the occasional exception and everything else is easy. You will also find URLs called URIs. URI stands for Uniform Resource Indicator and is the official term for URL as it is written in the standards. Unless you are writing a standards manual, the two terms are interchangeable. Writing the URLURLs are written in the displayable characters of the ASCII character set. If a character is not displayable, then you shouldn't use it. This particularly includes spaces, which should never be used in the names of Web files and directories. However, if, for some reason, you have to use non-displaying or special characters, they can be represented by a percent sign followed by two hexadecimal digits. This is different from the way special characters are represented in the rest of the XHTML code.
For instance, a space is written as http://www.datefix.com/process?12%2f01%2f99
where Any character can be encoded in a URL except those that serve as command delimiters. Thus, the scheme name and the slashes and colon that delimit the sections of the address must be written as themselves to work, however, the rest of the address could be written entirely in special character codes and the address would still work.
If you are hard coding a search string into a URL within the content of your Web pages, it is important that you escape your characters. For instance, if we wanted to code a statement that passed information back to the server that would mimick a form data submission, we might want to write a URL like the following: [*snip*]/index.php?page=this+one?&from=rulost? The problem with it is that it contains question marks, which cannot occur in a URL except to separate the resource path from the search string. To encode it as a string literal in our document, we would want to write: [*snip*]/index.php?page=thisone%3f&from=rulost%3f
Note that we are actually using two separate encoding schemes here, the URL characters that should always be encoded when used as string literals
*The Tilde is an example of characters having different meanings in different contexts. On a UNIX server it is often followed by a user ID as a shorthand for their home directory. If used in a file name, it could cause confusion if not encoded, since it has a special meaning to the server.
These pages can be found at:
[http://academ.hvcc.edu/~kantopet/]
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||