The Basic feature of Hypertext is that you can hyperlinks documents
or a part of another document or the same document
Hyperlinks can be used for all kinds of effects. They can be used inside tables of contents and lists of topics. With a click of the mouse on their browser screen or a press of a key on their keyboard, readers select and automatically jump to a topic of interest in the same document or to another document located in an entirely different collection somewhere around the world.
Hyperlinks also point readers to more information about a mentioned topic, Authors use hyperlinks to reduce repetitive information.
when activated and selected (usually with a mouse) by the user, causes the browser to link. It automatically loads and displays another portion of the same or another document or triggers some Internet service-related action.
Section 2
Section.2 REFERENCING DOCUMENTS:THE URL
Every web has unique address called URL (Uniform Resource Locator)
Several HTML/XHTML tags include a URL attribute value, including hyperlinks, inline images, and forms. All use the same URL
6.2.1 Writing a URL Write URLs using the displayable characters in the US-ASCII character set.
http://www.blah-blah.com
6.2.1.1 Handling reserved and unsafe characters
In addition to the nonprinting characters, you'll need to encode reserved and unsafe characters in your URLs as well.
Reserved characters are those that have a specific meaning within the URL itself. This URL actually references the resource named compute on the www.calculator.com server and passes the string 3/4 to it,as delineated by the question mark (?). Unsafe characters are those that have no special meaning within the URL but may have a special meaning in the context in which the URL is written.
Table of Reserved and Unsafe characters and their URL encodings
Character
Description
Usage
Encoding
;
Semicolon
Reserved
%3b
/
Slash
Reserved
%2f
?
Question mark
Reserved
%3f
:
Colon
Reserved
%3a
@
At sign
Reserved
%40
=
Equals sign
Reserved
%3d
&
Ampersand
Reserved
%26
<
Less than sign
Unsafe
%3c
>
Greater than sign
Unsafe
%3e
"
Double quotation mark
Unsafe
%22
#
Hash symbol
Unsafe
%23
%
Percent
Unsafe
%25
{
Left curly brace
Unsafe
%7b
}
Right curly brace
Unsafe
%7d
|
Vertical bar
Unsafe
%7c
\
Backslash
Unsafe
%5c
^
Caret
Unsafe
%5e
~
Tilde
Unsafe
%7e
[
Left square bracket
Unsafe
%5b
]
Right square bracket
Unsafe
%5d
`
Back single quotation mark
Unsafe
%60
6.2.2 Absolute and Relative URLs
You may address a URL in one of two ways: absolute or relative. An absolute URL is the complete address of a resource and has everything your system needs to find a document and its server on the Web. At the very least, an absolute URL contains the scheme and all required elements of the scheme_specific_part of the URL. It may also contain any of the optional portions of the scheme_specific_part.
With a relative URL, you provide an abbreviated document address that, when automatically combined with a "base address" by the system, becomes a complete address for the document.
6.2.2.1 Relative schemes and servers
protocol
Server
Directory
File
Base URL
http
www.yahoo.com
/
Relative
not-mentioned
not-mentioned
not-mentioned
index.html
Absolute URL
http
www.yahoo.com
/
index.html
6.2.2.2 Relative document directories
protocol
Server
Directory
File
Base URL
http
www.yahoo.com
/Search
index.html
Relative
ftp
not-mentioned
/planting
index.html
Absolute URL
ftp
www.yahoo.com
/planting
index.html
6.2.2.3 Using relative URLs
Relative URLs are more than just a typing convenience. Because they are relative to the current server and directory, you can move an entire set of documents to another directory or even another server and never have to change a single relative link.
6.2.3 The http URL
The http URL is by far the most common. It is used to access documents from a web server, and it has two formats:
http://server:port/path#fragment
http://server:port/path?search
6.2.3.1 The http server
The server is the unique Internet name or Internet protocol (IP) numerical address of the computer system that stores the web resource. We suspect you'll mostly use more easily remembered Internet names for the servers in your URLs.
6.2.3.2 The http port
The port is the number of the communication port by which the client browser connects to the server. It's a networking thing — servers perform many functions besides serving up web documents and resources to client browsers: electronic mail, FTP document fetches, filesystem sharing, and so on. Although all that network activity may come into the server on a single wire, it's typically divided into software-managed "ports" for service-specific communications — something analogous to boxes at your local post office.
6.2.3.3 The http path
The document path is the Unix-style hierarchical location of the file in the server's storage system. The pathname consists of one or more names separated by slashes. All but the last name represent directories leading down to the document; the last name is usually that of the document itself.
Although the server name in a URL is not case-sensitive, the document pathname may be. Since most web servers are run on Unix-based systems, and Unix filenames are case-sensitive
6.2.3.4 The http document fragment
The fragment is an identifier that points to a specific section of a document. In URL specifications, it follows the server and pathname and is separated by the pound sign (#). A fragment identifier indicates to the browser that it should begin displaying the target document at the indicated fragment name.
6.2.3.5 The http search parameter
The search component of the http URL, along with its preceding question mark, is optional. It indicates that the path is a searchable or executable resource on the server. The content of the search component is passed to the server as parameters that control the search or execution function.
6.2.3.6 Sample http URLs
http://www.oreilly.com/catalog.html
http://www.oreilly.com/
http://www.kumquat.com:8080/
http://www.kumquat.com/planting/guide.html#soil_prep
http://www.kumquat.com/find_a_quat?state=Florida
6.2.4 The file URL
The file URL is perhaps the second most common one used, but it is not readily recognized by web users and particularly web authors. It points to a file stored on a computer without indicating the protocol used to retrieve the file.
6.2.4.1 The file server
The file server can be, like the http one, an Internet domain name or IP address of the computer containing the file to be retrieved. Unlike http, however, which requires TCP/IP networking, the file server may also be the unqualified but unique name of a computer on a personal network, or a storage device on the same computer.
6.2.4.2 The file path
This is the path of the file to be retrieved on the desired server. The syntax of the path may differ based upon the operating system of the server; be sure to encode any potentially dangerous characters in the path.
6.2.4.3 Sample file URLs
file://localhost/home/chuck/document.html
file:///home/chuck/document.html
file://marketing.kumquat.com/monthly_sales.html
file://D:/monthly_sales.html
6.2.5 The mailto URL
The mailto URL is very common in HTML/XHTML documents. It has the browser send an electronic mail message to a named recipient. It has the format:
mailto:address
The address is any valid email address, usually of the form:
user@server
6.2.5.1 Defining mail header fields
The popular browsers open an email helper or plug-in application when the user selects a mailto URL. It may be the default email program for their system, or Outlook Express with Internet Explorer, or Netscape's built-in Communicator. With some browsers, users can designate their own email programs for handling mailto URLs by altering a specification in their browsers' Internet Options or Preferences.
6.2.6 The ftp URL
The ftp URL is used to retrieve documents from an FTP (File Transfer Protocol) server.
ftp://user:password@server:port/path;type=typecode
6.2.6.1 The ftp user and password
FTP is an authenticated service, meaning that you must have a valid username and password in order to retrieve documents from a server. However, most FTP servers also support restricted, nonauthenticated access known as anonymous FTP.
6.2.6.2 The ftp server and port
The ftp server and port operate by the same rules as the server and port in an http URL. The server must be a valid Internet domain name or IP address, and the optional port specifies the port on which the server is listening for requests.
6.2.6.3 The ftp path and typecode
The path component of an ftp URL represents a series of directories, separated by slashes, leading to the file to be retrieved. By default, the file is retrieved as a binary file; this can be changed by adding the typecode (and the preceding ;type=) to the URL.
6.2.6.4 Sample ftp URLs
ftp://www.kumquat.com/sales/pricing
ftp://bob@bobs-box.com/results;type=d
ftp://bob:secret@bobs-box.com/listing;type=a
6.2.7 The javascript URL
The javascript URL actually is a pseudoprotocol, not usually included in discussions of URLs. Yet, with advanced browsers like Netscape and Internet Explorer, the javascript URL can be associated with a hyperlink and used to execute JavaScript commands when the user selects the link.
6.2.7.1 The javascript URL arguments
the javascript pseudoprotocol is one or more semicolon-separated JavaScript expressions and methods, including references to multi-expression JavaScript functions that you embed within the <script> tag in your documents
6.2.8 The news URL
Although rarely used anymore, the news URL accesses either a single message or an entire newsgroup within the Usenet news system. It has two forms:
news:newsgroup
news:message_id
An unfortunate limitation in news URLs is that they don't allow you to specify a news server.
6.2.8.1 Accessing entire newsgroups
There are several thousand newsgroups devoted to nearly every conceivable topic under the sun and beyond. Each group has a unique name, composed of hierarchical elements separated by periods.
6.2.8.2 Accessing single messages
Every message on a news server has a unique message identifier (ID) associated with it. This ID has the form:
unique_string@server
The unique_string is a sequence of ASCII characters; the server is usually the name of the machine from which the message originated. The unique_string must be unique among all the messages that originated from the server. A sample URL to access a single message might be:
news:12A7789B@news.kumquat.com
6.2.9 The nntp URL
The nntp URL goes beyond the news URL to provide a complete mechanism for accessing articles in the Usenet news system. It has the form:
nntp://server:port/newsgroup/article
6.2.9.1 The nntp server and port
The nntp server and port are defined similarly to the http server and port, described earlier. The server must be the Internet domain name or IP address of an nntp server; the port is the port on which that server is listening for requests.
6.2.9.2 The nntp newsgroup and article
The newsgroup is the name of the group from which an article is to be retrieved
6.2.9.3 Sample nntp URLs
nntp://news.kumquat.com/alt.fan.kumquats/417
6.2.10 The telnet URL
The telnet URL opens an interactive session with a desired server, allowing the user to log in and use the machine.
6.2.10.1 The telnet user and password
The telnet user and password are used exactly like the user and password components of the ftp URL, described previously. In particular, the same caveats apply regarding protecting your password and never placing it within a URL.
6.2.10.2 The telnet server and port
The telnet server and port are defined similarly to the http server and port, described earlier. The server must be the Internet domain name or IP address of a telnet server; the port is the port on which that server is listening for requests.
6.2.11 The gopher URL
Gopher is a web-like document-retrieval system that achieved some popularity on the Internet just before the Web took off, making gopher obsolete. Some gopher servers still exist, though, and the gopher URL lets you access gopher documents.
The gopher URL has the form:
gopher://server:port/path
6.2.11.1 The gopher server and port
The gopher server and port are defined similarly to the http server and port, described previously. The server must be the Internet domain name or IP address of a gopher server; the port is the port on which that server is listening for requests.
If the port and its preceding colon are omitted, the default port of 70 is used.
6.2.11.2 The gopher path
The gopher path can take one of three forms:
type/selector
type/selector%09search
type/selector%09search%09gopherplus
6.4.1 Lists of Links Perhaps the most common way to present hyperlinks is in ordered or unordered lists in the style of a table of contents or list of resources.
See Example Below or click here
6.4.2 Inline References
If you aren't collecting links into lists, you're probably sprinkling them throughout your document. So-called inline links are more in keeping with the true spirit of hypertext.
6.4.3 Linking Dos and Don'ts
Keep the link content as concise as possible
Never place two links immediately adjacent to one another
Be consistent
Try reading your document with all the nonanchor text removed
6.4.4 Using Images and Links
Keep the link content as concise as possible
Never place two links immediately adjacent to one another
Try reading your document with all the nonanchor text removed
It has become fashionable to use images and icons instead of words for link contents. For instance, instead of the word "next," you might use an icon of a little pointing hand.
Section 5
Section.5 MOUSE-SENSITIVE IMAGES
6.5 Mouse-Sensitive Images
Normally, an image placed within an anchor simply becomes part of the anchor content. The browser may alter the image in some special way (usually with a special border) to alert the reader that it is a hyperlink, but users click the image in the same way they click a textual hyperlink.
There are two ways to create image maps, known as server-side and client-side image maps. The former, enabled by the ismap attribute for the <img> tag
The latter is created with the usemap attribute for the <img> tag, along with corresponding <map> and <area> tags.
6.5.1 Server-Side Image Maps
An image-map processing application typically tests each shape in the order in which it appears in the image file and returns the document specified by the corresponding URL to the browser if the user's mouse x,y coordinates fall within the boundaries of that shape.
6.5.1.1 Server-side considerations
With mouse-sensitive, ismap-enabled image maps, the browser is required to pass along only the URL and mouse coordinates to the server.
6.5.2 Client-Side Image Maps
Server-side image maps also mean delays for the user while browsing, since the browser must get the server's attention to process the image coordinates.
The obvious down side to server-side image maps is that they require a server. That means you need access to the required HTTP server or its /cgi-bin directory, either of which is rarely available to anyone
Client-side image maps suffer from none of these difficulties. Enabled by the usemap attribute for the <img> tag and defined by special <map> and <area> extension tags.
client-side image maps don't require a special server connection and can even be implemented in non-Web environments
To create a client-side image map, include the usemap attribute as part of the <img> tag.
6.5.3 The <map> Tag
the <map> tag may contain either a sequence of <area> tags or conventional HTML/XHTML content including <a> tags.
6.5.3.1 The name attribute
The value of the name attribute in the <map> tag is the name used by the usemap attribute in an <img> or <object> tag to locate the image map specification. The name must be unique and not used by another <map> in the document.
6.5.3.2 The class, id, style, and title attributes
The style sheet display-related style and class attributes for the <map> tag are useful only when the <map> tag contains conventional content.
6.5.3.3 The event attributes
The various event attributes allow you to assign JavaScript handlers to events that may occur within the confines of the map.
6.5.4 The <area> Tag
<area>
The Function
Defines coordinates and links for a region on a client-side image map
6.5.4.1 The alt attribute
Like its cousin for the <img> tag, the alt attribute for the <area> tag attaches a text label to the image
6.5.4.2 The coords attribute
depends upon the shape attribute
for
Circle,circ
coords="x,y,r"
polygon,poly
coords"x1,y1,x2,y2,x3,y3,...." where x,y is a point of any of the vertics
rectangle,rect
coords="x1,y1,x2,y2" where the points are on upper left of the shape & the lower right of the shape
6.5.4.3 The href attribute
defines the URL of the desired link if its region in the associated image map is clicked.
example <area coords="75,75,99,99" href="link4.html">
6.5.4.4 The nohref attribute
The nohref attribute for the tag defines a mouse-sensitive region in a client-side image map for which no action is taken.
6.5.4.5 The notab, taborder, and tabindex attributes As an alternative to the mouse, a user may choose a document "hot spot," such as a hyperlink embedded in an image map, by pressing the Tab key. Once chosen, the user activates the hyperlink by pressing the Enter key.
6.5.4.6 The event attributes The same mouse-related JavaScript event handlers that work for the anchor (<a>) tag also work with client-side image map hyperlinks.
6.5.4.7 The shape attribute
Use the shape attribute to define the shape of an image map's mouse-sensitive region: The value of the shape attribute affects how the browser interprets the value of the coords attribute.
6.5.4.8 The target attribute The target attribute gives you a way to control where the contents of the selected hyperlink in the image map get displayed. Commonly used in conjunction with frames or multiple browser windows.
6.5.4.9 The title attribute The title attribute lets you specify a title for the document to which the image map's area links.
6.5.4.10 The class, dir, id, lang, and style attributes
The class and style attributes allow you to supply display properties and class names to control the appearance of the area, although their value seems limited for this tag.
6.5.5 A Client-Side Image Map Example
See Example Below or click here !
6.5.6 Handling Other Browsers
Unlike its server-side ismap counterpart, the client-side image map tag with attribute (<img usemap>) doesn't need to be included in an <a> tag. But it may be, so that you can gracefully handle browsers that are unable to process client-side image maps.
6.5.7 Effective Use of Mouse-Sensitive Images
Some of the most visually compelling pages on the Web have mouse- and hot-key-sensitive images: maps with regions that (when clicked or selected with the Tab and Enter keys) lead. any page that has a mouse-sensitive image has a text-only equivalent easily accessible from a link on the image-enabled version.
Section 6
Section.6 CREATING SEARCHABLE DOCUMENTS
6.6.1 The <isindex> Tag
<isindex>
The Function
Indicates that a document can be searched
Own attributes
action (Internet Explorer), class, dir, id, lang, prompt, style, title
End Tag
None in HTML, </isindex> in XHTML
Contains
Nothing
Used in
Head_content
See Example Below
6.6.1.1 The prompt attribute Besides the <isindex> tag in the header of a searchable document, the other important element of this special tag is the query URL.
6.6.1.2 The query URL it is the URL of the source document itself — not good if your document can't handle the query.The browser appends a question mark to the query URL, followed by the specified search parameters
cgi-bin/quat-query?insect+control
6.6.1.3 The action attribute this attribute is as href
attribute
6.6.1.4 The class, dir, id, lang, style, and title attributes The class and style attributes allow you to supply display properties and class names to control the appearance of the tag.
6.6.1.5 Server dependencies
Like image maps, searchable documents require support from the server to make things work.
Section 7
Section.7 RELATIONSHIPS
6.7.1 The <base> Header Element
<base>
The Function
Defines the base URL for other anchors in the document
Own attributes
href, target
End Tag
None in HTML, </base> in XHTML
Contains
Nothing
Used in
Head_content
6.7.1.1 The href attribute The href attribute must have a valid URL as its value, which the browser then uses to define the absolute URL against which relative URLs are based within the document
The <link> tags belongs in the content and nowhere else. The attributes of the <link> tag are used like those of the <a> tag, but their effects serve only to document the relationship between documents.<br>
6.7.2.1 The href attribute
the href attribute specifies the URL of the target <link> tag.
6.7.2.2 The rel and rev attributes The rel and rev attributes express the relationship between the source and target documents.
<link href="part-14.html" rel=next rev=prev>
6.7.2.3 The title attribute The title attribute lets you specify the title of the document to which you are linking.
<link href="pics/kumquat.gif" title="A photograph of the Noble Fruit">
6.7.2.4 The type attribute The type attribute provides the MIME content type of the linked document. Supported by both Internet Explorer and Netscape.
<link href="styles/classic.css" rel=stylesheet type="text/css">
6.7.2.5 How browsers might use <link>
Although the standards do not require browsers to do anything with the information provided by the tag, it's not hard to envision how this information might be used to enhance the presentation of a document.
The <meta> tag belongs in the document header and has no content.
The name attribute supplies the name of the name/value pair defined by the <meta> tag.
<meta name="keywords" content="kumquats, cooking, peeling, eating">
6.8.1.2 The content attribute
The content attribute provides the value of the name/value pair. <meta name="keywords" content="kumquats, cooking, peeling, eating">
6.8.1.3 The http-equiv attribute The http-equiv attribute supplies a name for the name/value pair and instructs the server to include the name/value pair in the MIME document header that is passed to the browser before sending the actual document. <meta http-equiv="charset" content="iso-8859-1">
6.8.1.4 The charset attribute
Internet Explorer provides explicit support for a charset attribute in the <meta> tag. Set the value of the attribute to the name of the character set to be used for the document. This is not the recommended way to define a document's character set.
6.8.1.5 The scheme attribute This attribute specifies the scheme to be used to interpret the property's value.
6.8.2 The <nextid> Header Element (Archaic)
<nextid>
The Function
Defines the next valid document entity identifier
Own attributes
n
End Tag
None in both HTML,XHTML
Contains
Nothing
Used in
Head_content
The idea behind the tag is to provide some way of automatically indexing fragment identifiers.
6.8.2.1 The n attribute