Web design creating cool web sites with html, xhtml, and css

Page 146

Chapter 6: Putting the Web in World Wide Web: Adding Pointers and Links

119

You can start to get a feeling of how complex HTML text can become if you imagine that each entry in the phone list actually is a link to that person’s home page or other material somewhere else on the Web. Every line of information displayed in the browser could easily be the result of four or more lines of HTML.

Linking to jump targets in external documents Now that you’re familiar with the concept of jumping around within a single document, you can also add the #anchor notation to the end of any Web URL to make that link move directly to the specific anchor point in the document. Suppose, for example, that the Web design guidelines page resides on a system called www.intuitive.com, and that its full URL is http://www.intuitive.com/coolsites/ design.html. (It is, actually. Try it!) A visit to the page reveals that a variety of anchor tags are embedded in the HTML, including the #highlights reference at the beginning of the document, enabling you to jump directly to the executive summary. You could link directly to that spot from another Web page with this URL: http://www.intuitive.com/coolsites/design.html#highlights

caution

Pointing to external anchors can be useful for linking to large Web documents that contain a great deal of information that might otherwise confuse your reader. Be careful: If anyone but you maintains the anchors, the names may change, the docu­ ments may be reorganized, or other changes may suddenly invalidate your links without your knowledge. There’s always a chance that a whole document might vanish from the Web, of course; but the chance that a link within a document might change is considerably higher.

Changing Link Colors One more topic before I conclude this chapter: Using standard HTML, you can change a link’s default color by specifying a few special <body> tag attributes, shown in Table 6-1.

Table 6-1: Link Color <body> Tag Attributes Attribute

Possible Values

Function

text

Color name or hex rgb value

Specifies color of text on the page

link

Color name or hex rgb value

Specifies color of hypertext references

vlink

Color name or hex rgb value

Specifies color of links you’ve visited

alink

Color name or hex rgb value

Specifies color of link while mouse button is down


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.