• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Making Links

When I set up a blog for my friend Lisa, she took to it quickly. She immediately started chronicling the secret behind-the-scenes action of a murder trial on which her friend was a juror. (I don’t think she was supposed to be doing that. She can blog from jail, right?) Anyway, the first thing Lisa asked was, “How do I make links?” This is what I told her:

Put the cursor in front of the words you want to be linked.

Type the beginning <a> tag.

Add the HREF attribute.

Enter the exact URL of the link surrounded by quotation marks.

Place the cursor at the end of the text you want to link.

Type the closing </a> tag.

In Listing 4.1, the word example is linked to the website, imdb.com.

Listing 4.1. Link in Action

Lisa, here's an <a href="http://www.imdb.com">example</a> of a link 
in action. 

I told Lisa to use Listing 4.1 as a model for future links, and soon she was linking with wild abandon. Although Lisa is an accomplished screenwriter, she had never even thought about HTML when she started divulging courtroom secrets on her weblog. Many WYSIWYG blog interfaces make it easier to add links, but it is still good to know how to make it work for yourself.

Creating an Email Link

Lisa then decided to move away from courtroom drama and use her blog as an advice column. She wanted to know how to make a link that makes it easy for people to email questions to her. You, too, can make a link that, when clicked, launches your reader’s email application and preloads your email address (or any address specified) into a new email message. Just follow the preceding steps for creating a link, but use a slight variation in Step 4: Instead of a URL inside the quotation marks, type mailto: plus the target email address (see Listing 4.2).

Listing 4.2. Email Link Example

<a href="mailto:biz@bizstone.com">Email me</a>! 

Sleazy Spam-Bots

If you don’t want spam-bots (software that scans for email addresses to be used for junk email campaigns) stealing your address, but you do want feedback from your readers, don’t use the mailto link. Instead , spell out your email address, like so:

Email me! My address is biz @ bizstone dot com. 

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint