According to the HTML standards, it is not possible to have more then a single link color on any given page. However, with the aid of Cascading Style Sheets and a browser that supports them, it is possible. Further, there is a hack that, while invalid, works in some Netscape browsers.
According to the HTML standards, a document's link color is defined by the LINK attribute of the <BODY> tag. This is done by setting its value equal to a hexidecimal number representing a color from the sRGB color space (for example "#0056A5"), or as one of 16 "widely understood colors." The formal HTML specifications do not allow for the changing of a link's color part way through the document.
With the introduction of Cascading Style Sheets (CSS), web authors were given a means to influence the presentation of a document that was just not possible with standard HTML. One element open to suggestion is the color of standard HTML elements such as links. Using CSS, an author can influence a link's color as follows:
A { color: [color] }
In the above example, you should replace "[color]" with the color in which you want the link rendered. Colors may be specified in one of four ways:
In some versions of Netscape Navigator, specifically those that support the FONT COLOR attribute, there is a way that an author can specify multiple color links. Note that this method violates the HTML 3.2 specifications and may cause problems associated with the FONT COLOR attribute on some other browsers. The hack is as follows:
<A HREF="[url]"><FONT COLOR="[color]">click me</FONT></A>
In the above hack, you must make sure that the <FONT> tag is contained within the <A> tag and not visa versa. Further, you should replce "[url]" with the URL of the object you wish to link to and you should replace "[color]" with the hexadecimal color that you wish your link to be.
| [Section Index] | [Home Page] |