Helping people with computers... one answer at a time.

We take links for granted, but they're an important part of the web and email. We'll look at what they mean and how they're written.

Within this article of yours that I'm reading you have a few plain text links that are typed in blue letters and underlined. When I click on them I'm taken to the actual hypertext (http:) URL. For example, when I click on the underlined "I have a few myself" and "free Internet Safety eBook" I'm taken to http://store.pugetsoundsoftware.com/ebooks.php and http://med.askleomedia.com/ebooks/InternetSafety.pdf, respectively. How did you change the actual hypertext address to a clickable plain text link?

Time for my favorite answer: it depends.

OK, that's not my favorite answer, but it certainly is a common one.

It depends on where you're creating the link: web pages and email and discussion forums are often all different, though typically with the same result.

It also depends on what tools you may or may not be using to create the link.

I'll look at how links are structured, and how common tools encode them.

What's a Link?

A link actually has two parts: the part you see, and the part you don't see. Smile

The part you see is the text that's displayed, and the part you don't see is the place to go (or more correctly, the action to take) should you click on that link.

"A link actually has two parts: the part you see, and the part you don't see."

On the web and in most email programs links are encoded in HTML (HyperText Markup Language) - the "language" of most all web pages. When your browser displays a web page it's "reading" the HTML provided by the website and formatting what you see according to the instructions encoded in that HTML.

A link, then, looks like this:

<a href="http://store.pugetsoundsoftware.com/ebooks.php">a few myself</a>

That's a link where the part you see is "a few myself", and the part you don't see is the instruction that says that "when clicked go to http://store.pugetsoundsoftware.com/ebooks.php". When used, it looks like this: a few myself.

I happen to write directly in HTML. (What can I say? I'm a geek.) So I when I create a link I actually type in

<a href="http://store.pugetsoundsoftware.com/ebooks.php">a few myself</a>

It's second nature to me. (There are also all sorts of options that might be applied, and editing directly like this lets me control what those are.) It's the moral equivalent of editing an HTML file in Notepad or another plain-text editor.

There are lots of web page editing tools that will "hide" all that HTMLish stuff and do it for you. Word processors like Microsoft Word are one example(*) - you simply highlight the words you want to be hyperlinked (it's the part you see), type CTRL+K and you'll be prompted to type in the url that you want your text to link to (the part you don't see). The software then outputs the appropriate HTML when you save the file.

Links in Email

Many email programs, if you're composing email in HTML format work exactly like the Word Processing example above. You select the part you want to be hyperlinked, press a keystroke or click on a link icon in a toolbar, and you'll be prompted for the URL to use.

However, email gets weird in a couple of ways.

When you're composing email your email program may watch for things that look like URLs as you type. When it sees you typing a URL is may then automatically create a link for you.

For example, a typed in URL like http://ask-leo.com might get automatically transformed into http://ask-leo.com, which means that the HTML generated would be:

<a href="http://ask-leo.com">http://ask-leo.com</a>

In a case like this, the program has set the "part you see" to be the same as the "part you don't see" - http://ask-leo.com.

That's HTML mail. Plain text email gets weirder still.

In plain text email there is no HTML, and there is no opportunity to actually create a link. If I were to type in the HTML for a link, then that's what would appear in the email: <a href="http://ask-leo.com">http://ask-leo.com</a>, for example.

What email programs often do to compensate is to once again look for things that look like links, and the display them as if they were links, and treat them as if they were links when people click on them.

So if in your plain text formatted email you type:

Hey, go check out http://ask-leo.com - I found the answer there!

When it's displayed at the receiving end it might look like this:

Hey, go check out http://ask-leo.com - I found the answer there!

where the thing that looked like a URL is treated as a link to that URL. The sender had nothing to do with that - there's nothing in the email itself that says that should be a link. On display the recipients email program might make that assumption.

HTML? BBML! BBCODE! Wiki Markup! More!

Sadly, even though HTML is always the output mechanism when a web page is displayed, for various reasons there are other "languages" that are translated into HTML when displayed, and have different syntaxes for creating links.

BBML and/or BBCODE is an "HTML-like" markup used by many discussion forums and bulletin board systems. Using BBCODE the first example link I showed you would be:

[url=http://store.pugetsoundsoftware.com/ebooks.php]a few myself[/url]

Many consider it to be much simpler than HTML, and I expect it's popularity in forum software is a direct result.

Wiki Markup language is used on sites like Wikipedia. There my example link would be:

[http://store.pugetsoundsoftware.com/ebooks.php a few myself]

Regardless of which language is required, several things remain constant:

  • The "part you see" and the "part you don't see" both exist and may differ. Example: a few myself.

  • The "part you see" and the "part you don't see" might well be the same. Example: http://ask-leo.com.

  • When displayed on a web page it's done in HTML.

There ya go. More than you ever wanted to know about links, I'm sure.

(*) I actually don't recommend using Word as your HTML editor, as it has historically produced pretty awful HTML. I actually don't have a current recommendation for a true WYSIWYG HTML editor.)

Article C4435 - September 4, 2010 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

3 Comments
Mark
September 8, 2010 4:23 AM

For a good (relatively speaking) WYSIWYG HTML editor, I would suggest Microsoft Office Sharepoint 2007, which anyone can download free-of-charge at http://www.microsoft.com/downloads/details.aspx?FamilyID=baa3ad86-bfc1-4bd4-9812-d9e710d44f42&displaylang=en

Bill Nelson
September 9, 2010 1:03 AM

I'm not a geek and don't know how to use HTML directly. I've been writing a daily humor letter to several friends and family members for several years. About a year ago, I began assembling it in "Word" instead of "Outlook Express" because it's so much easier to format. I've always had links to various internet addresses, but I began including internal links a few months ago for the convenience of the reader who wants to read their favorite section first (or only.)
Last week, I took your suggestion to switch to "Thunderbird" for my email client. I've noticed two things; "Word" still uses OE to send the messages, and the internal links don't work in Thunderbird, as they did in OE. Any ideas as to why not? Is there any way to have Word use Thunderbird?

Alex
September 9, 2010 3:33 AM

I actually like using KompoZer (formerly Nvu), but often go to using SeaMonkey's composing tool. I can use HTML, and often edit in Notepad, but like the ability to instantly check my HTML and toggle back and forth from HTML to WYSIWYG.
I used to use AOlPress, but that does not support much any more. It is good for basic HTML though.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.