Writing HTML | About | FAQ | Alumni | Kudos | References | Tags | Lessons | previous | next |

12. Address Footers and E-Mail Links

Hey! You created a snazzy web page -- autograph it with a footer! Let people on the web send you an e-mail message right from your web page!

Objectives

After this lesson you will be able to:

Lesson

Note: If you do not have the working documents from the previous lessons, download a copy now.

A worthwhile feature of web pages is a "footer" at the bottom of a page that provides information about the author and the document, maybe the last date it was modified, as well as a means to send the author a message by e-mail.

This is the place for the address tag which just stylizes a block of text in italic and offsets it to a new line.

It is a good idea to make footers brief, informative, and consistent between your different web pages. Some useful information to include is:

As examples, see the footers at the bottom of every web page in this tutorial. In composing your own style, take a look at other web pages for ideas. Imitation still is a very high form of flattery!

The HTML format for the address tag looks like:


    <address>
      text text text text text text text text text
      text text text text text text text text text
    </address>

Note that all other HTML inside the address tag is legal, so we might modify it with bold tags, line breaks, and a hypertext link tag:

HTML Result
<address>
<b>Page Title</b><br>
Last Updated February 31, 1999<br>
Web Page by Alan Levine
(alan.levine@domail.maricopa.edu) <br>
<a href="http://www.mcli.dist.maricopa.edu/">
Maricopa Community Colleges</a><br>
</address>
sample web page
Page Title
Last Updated February 31, 1999
Web Page by Alan Levine (alan.levine@domail.maricopa.edu)
Maricopa Community Colleges

Now, suppose someone was reading your page and wanted to send you a comment on how nice your page looked. They would have to write down your e-mail address, launch another program, and send you a message. Wouldn't it be great if you could send email from your Web browser? Well, most web browsers now can!

The way to do this is to create a hypertext link with the mailto type in the URL (see lesson 8b for a refresher). Create an email hypertext link like this:


    <a href="mailto:alan.levine@domail.maricopa.edu">send an e-mail to alan</a>

When the text send an e-mail to alan is clicked, the web browser will bring up a screen where you can compose a message and send it to me. What's more, you can also insert a default subject line for the e-mail message (NOTE: this may not work on all browsers):


    <a href="mailto:alan.levine@domail.maricopa.edu?subject=hi from lesson 12">
       send an e-mail to alan</a>

Try it! Send me a note! send an e-mail to alan

And there is more you can do by adding on to the mailto link. If you wanted to send the same message to more than one address, say the President and Vice-President, you just put the email addresses separated by commas (note that in your HTML code this should be one long line, we have broken it up so it displays better here):

    <a href="mailto:alan.levine@domail.maricopa.edu,pres@whitehouse.gov,
         vice-pres@whitehouse.gov?subject=hi from lesson 12">
         send an e-mail to alan, the pres, and the vice-pres</a>

Let's say the Vice-President should only by carbon copied ("cc:") on this message. You can do this by adding another string after the subject using cc= and the email address. Note that the Subject= string and the cc= string are separated by a &:

    <a href="mailto:alan.levine@domail.maricopa.edu,pres@whitehouse.gov,
         ?subject=hi from lesson 12&cc=vice-pres@whitehouse.gov">
         send an e-mail to alan, the pres; cc: the vice-pres</a>

And lastly, you can try insert a default message using the syntax body= and the text that should be placed in the body part of the email message window:

    <a href="mailto:alan.levine@domail.maricopa.edu,pres@whitehouse.gov,
         ?subject=hi from lesson 12&cc=vice-pres@whitehouse.gov
         &body=Hi there, I think Alan deserves a dinner at your place.">
         send an e-mail to alan, the pres; cc: the vice-pres, with a default message</a>

Please do not try sending these messages! Alan likes e-mail but don't bother the folks in the Whitehouse!

Now, let's return to our Volcano example. Note that you can have any text (or graphic) act as the hypertext link. So in the previous example, we would modify the HTML to have the internet address create the link for e-mail.

HTML Result
<address>
<b>Page Title</b><br>
Last Updated February 31, 1999<br>
Web Page by Alan Levine
<A HREF="mailto:alan.levine@domail.maricopa.edu">
(alan.levine@domail.maricopa.edu)</A> <br>
<a href="http://www.mcli.dist.maricopa.edu/">
Maricopa Community Colleges</a><br>
</address>
sample web page
Page Title
Last Updated February 31, 1999
Web Page by Alan Levine (alan.levine@domail.maricopa.edu)
Maricopa Community Colleges
And finally, we recommend that you also put in the footer the URL for the page. Why? What if someone prints out your web page but does not bookmark it or write down its URL? Including the URL on the page provides a handy reference. Just modify the above example (note how this HTML is below the <address>...</address> tag:
HTML Result
<address>
<b>Page Title</b><br>
Last Updated February 31, 1999<br>
Web Page by Alan Levine
<A HREF="mailto:alan.levine@domail.maricopa.edu">
(alan.levine@domail.maricopa.edu)</A> <br>
<a href="http://www.mcli.dist.maricopa.edu/">
Maricopa Community Colleges</a><br>
</address>
<p>
<tt>
URL: http://www.mcli.dist.maricopa.edu/tut/
</tt>
sample web page
Page Title
Last Updated February 31, 1999
Web Page by Alan Levine (alan.levine@domail.maricopa.edu)
Maricopa Community Colleges

URL: http://www.mcli.dist.maricopa.edu/tut/

Now it is time to add a footer to your HTML file. For this example, we assume you are "Lorrie Lava" a staff Volcanologist at Big University (feel free to put your own information in place of what is below):

  1. Open the HTML file, index.html in your text editor.
  2. At the bottom of the document (but above the </body></html> tags), add the following:
    
    <HR>
    <address><B>Volcano Web</B> <br>
    created by Lorrie Lava, <A HREF="mailto:lava@pele.bigu.edu">lava@pele.bigu.edu</A><br>
    Volcanic Studies, <A HREF="http://www.bigu.edu/">Big University</A><p>
    <TT>last modified: April 1, 1995</TT>
    </address>
    <p>
    <tt>URL: http://www.bigu.edu/web/index.html</tt>
    
    NOTE: We've used several HTML tags that have been covered in previous lessons. Also note the extra <p> tag at the bottom; this makes sure the last line of text is always visible.
  3. Save and Reload the HTML file.

Check Your Work

Compare your document with a sample of how this document should appear. If your document was different from the sample, review the text you entered in the text editor.

Review

Review topics for this lesson:

  1. What does an address tag do?
  2. Does an address tag have to be at the bottom?
  3. How do you create a tag that will e-mail to you? to someone else? With a subject line?

Independent Practice

Add an address footer and e-mail links to your own HTML documents.


Coming Next....

Yet another way to break up those long boring sections of text! The BLOCKQUOTE...

GO TO.... | Lesson Index | previous: "Definition Lists" | next: "Blockquotes" |

Writing HTML: Lesson 12: Address Footers and E-Mail Links
©1994-1999 Maricopa Center for Learning and Instruction (MCLI)
Maricopa Community Colleges

The 'net connection at MCLI is Alan Levine
Comments to alan.levine@domail.maricopa.edu

URL: http://www.mcli.dist.maricopa.edu/tut/tut12.html