A special characters in a URL is anything that is not an upper-or lowercase letter, a number (0-9), OR one of the following symbols: dollar sign (&),dash (-, underscore (_), or period (.). you might need to specify any other characters by using special URL escape codes to keep them from being interpreted as parts of the URL itself.
URL escape codes are indicated by a percent sign (%) and a two-character hexadecimal symbol from the ISO-latin-1 character set (a superset of standard ASCII). For example, %20is a space, %3f is a question mark, and %2f is a slash. (spaces are also sometimes encoded as +signs, and +signs are encoded as %2b)
Suppose that you have a directory name all my files. Your first pass at a URL with this name in it might look like the following:
http://myhost.comharddrove/all my files/www/file.html
if you put this URL in quotation marks in a link tag, it might work (but only if you put it in quotation marks). Because the spaces are considered special characters to the URL, however, some browsers might have problems with them and not recognize the pathname correctly. For full compatibility with all browsers. Use %20, as follows:
http://myhost.com/harddrive/A||%20files/www/file.html
most of the time, if you make sourer that your file and directory names are short and use only alphanumeric characters, you won’t need to include special characters in URLs. Keep this point in mind as you write your own pages.
HTML 4.01 and the <a>TAG
HTML 4.01 includes some additional attributes for the <a> tag that are less common. These offer the following:
· Tab index-supports a tabbing order so that authors can define an order for anchors and links, and then the user can tab between them the way the does in a dialog box in windows or the Mac OS.
· even handlers such as on click, on focus, and on blur-the full list of events is listed in the section “common attributes and events” of appendix By. you’ll learn how to use these events in Lesson 12 “introducing JavaScript.”
No comments:
Post a Comment