HTML and CSS Reference
In-Depth Information
Many designers, myself included, like to keep the visited link appearance the same as that of the
default link. Though you could define two identical CSS rules, one for a:link and another for
a:visited , it's more efficient to group the selectors, like this:
a:link, a:visited {
color: green;
font-weight: bold;
Similarly, I tend to group the a:hover , a:focus , and a:active states.
workinG wiTH e-MaiL and docuMenT Links
You can do more with links that open another page or section of a document in your browser.
Links can also be used to open a blank e-mail in a visitor's system, pre-addressed and ready for any
message. Links can also be set up to transfer virtually any type of document from the Web to any
user — with just a single click of the mouse.
To enable a link to pop open an e-mail message, set the href attribute to a mailto: preface com-
bined with the addressee's e-mail address. For example, if you wanted to add an Email Me! link
that, when clicked, opened a new e-mail to , yo ur code would look like this:
<a href=””>Em ail Me!</a>
The resulting e-mail message, of course, would vary according to the e-mail program on the user's
system. Figure 8-5 shows an e-mail message from an e-mail program called Mozilla Thunderbird on
the Mac as well as the initiating link.
FiGure 8-5
Search WWH ::

Custom Search