Click to skip over navigation

Web Design

   

mailto links



main menus


help pages


Valid XHTML 1.0!

 

Most web pages contain some way of directly contacting the author. For commercial web pages, the benefits of this are obvious. There is not much point advertising your wares online if the readers then have no way of getting in touch with you in order to buy them. But the same applies, really, to any web page. Personal sites are also a form of advertisement, and without some link back to the author, the web "presence" is merely a disembodied ghost, rather than an online "avatar" of the page's author.

Sites that are informational or trivial might not seem to need such a link in the same way, but remember that all good communication is two-way. Just as links themselves make a reciprocal exchange of information possible, so the author of any page should always be prepared to receive feedback from their readers. (Of course, the creators of pornographic or hate-oriented sites would happily disregard this advice, but if the existence of such sites is to say anything productive, surely it should be as examples to be opposed.)

A simple way to do this is to use a mail-to link. When activated, instead of loading up a new HTML file it will transfer you to an e-mail program in order that you can send a mail to a specified address. (For more complex information, forms are usually used: mailto links are simpler to learn, but also limited in use. Forms do not come into this course until the Advanced Web Techniques option: in lecture 9, in fact.)

The tag/attribute combination is the same as for all other links: <a href="...">. Now, however, the href attribute has to contain the e-mail address to which you want the link to connect. It must be prefixed by mailto:, as follows...

<a href="mailto:bob@leeds.ac.uk">Click here to mail Bob</a>

The result being: Click here to mail Bob. As usual, hover your mouse pointer over the link and look at the bottom bar, to see what happens there. (This isn't a real e-mail address by the way.)

Now, when the link is activated, it activates the designated mail client. Because Microsoft "bundle up" their Office software, in Internet Explorer the activated client will probably be Outlook Express; you can change this by going through Tools - Internet Options. If you have other browsers installed on your computer, you may have to set up a mail client yourself. Usually you would go through Edit - Preferences. It's not a particularly difficult task.

There is one disadvantage to putting your e-mail address on your web site. They are often "harvested" by spammers, you know, those nice people who send you e-mails advertising Viagra, Human Growth Hormone, get-rich-quick deals, etc etc. Spam is an insidious problem which seems to come and go in cycles. Whether it's excuse enough not to put your address on line is a decision you have to make. You may notice that for this reason I have disguised the e-mail address I place in the copyright notice at the bottom of each page: enough, at least, for a "bot" (a web-harvesting program) not to identify it not enough that a human reader could not understand it.

Back to the top

Back to the menu for lesson 3



Material on this site is © Drew Whitworth, 2005 Permission will usually be given to reproduce material from this site for non-commercial purposes, if credit is given. For enquiries, e-mail Drew at andrew [dot] whitworth [at] manchester [dot] ac [dot] uk.