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:
- Title or subject of the current page
- Date it was created/updated
- Copyright if appropriate (or even meaningful?)
- Name and e-mail for the web page author
- Name and hypertext link to affiliation/organization
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 28, 2002<br>
Web Page by Mike Blochowski
(MBlochowski@sfstoledo.org) <br>
<a href="http://www.sfstoledo.org/">
St. Francis De Sales High School</a><br>
</address>
|
|
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. Create
an email hypertext link like this:
<a href="mailto:MBlochowski@sfstoledo.org">send an e-mail to Coach Block</a>
When the text send an e-mail to Coach Block 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:MBlochowski@sfstoledo.org?subject=hi from Web Design">
send an e-mail to Coach Block</a>
Try it! Send me a note!
send an e-mail to Coach Block
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:MBlochowski@sfstoledo.org,pres@whitehouse.gov,
vice-pres@whitehouse.gov?subject=hi from lesson 12">
send an e-mail to Coach Block, the pres, and the vice-pres</a>
Let's say the Vice-President should only be carbon copied ("cc:") on this message. To do this, just add 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:MBlochowski@sfstoledo.org,pres@whitehouse.gov,
?subject=hi from Web Design&cc=vice-pres@whitehouse.gov">
send an e-mail to Coach Block, 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:MBlochowski@sfstoledo.org,pres@whitehouse.gov,
?subject=hi from Web Design&cc=vice-pres@whitehouse.gov
&body=Hi there, I think Coach Block deserves a pay raise.">
send an e-mail to Coach Block, the pres; cc: the vice-pres, with a default message</a>
Please do not try sending these messages! Coach Block likes e-mail but don't bother the folks in the Whitehouse!
| HTML |
Result |
<address>
<b>Page Title</b><br>
Last Updated February 28, 2002<br>
Web Page by Mike Blochowski
<a href="mailto:MBlochowski@sfstoledo.org">
(MBlochowski@sfstoledo.org)</a> <br>
<a href="http://www.sfstoledo.org/">
St. Francis De Sales High School</a><br>
</address>
|
|
|
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 28, 2002<br>
Web Page by Mike Blochowski
<a href="mailto:MBlochowski@sfstoledo.org">
(MBlochowski@sfstoledo.org)</a> <br>
<a href="http://www.sfstoledo.org/">
St. Francis De Sales High School</a><br>
</address>
<p>
<tt>
URL: http://www.sfstoledo.org/classes/cs101.htm
</tt>
|
|
Review
Review topics for this lesson:
- What does an address tag do?
- Does an address tag have to be at the bottom?
- How do you create a tag that will e-mail to you? to someone else? With a subject line?