How do I add a title to a link? March 28, 2002 6:02 AM   Subscribe

I have recently noticed that when I put my cursor on some links, like the one here, after a second or two I get a balloon briefly describing the link. Since I am an HTML novice I figure this is an added tag that I do not know. Can someone fill me in?
posted by anathema to MetaFilter-Related at 6:02 AM (31 comments total)

It is a title tag. :)
posted by grabbingsand at 6:11 AM on March 28, 2002

Tips here, anathema.
posted by rory at 6:17 AM on March 28, 2002

Thanks rory--
I would have searched but I had no idea what to search for!
posted by anathema at 6:22 AM on March 28, 2002

Small bit of pedantry: it's a title attribute. Normally this calling-everything-tag thing is harmless, but there actually is a title tag, and this is not it.
posted by rodii at 7:05 AM on March 28, 2002

Just for the record, I really dislike the title attribute because it obscures the URL that the link is pointing to. I like to know where I'm going.
posted by NsJen at 7:12 AM on March 28, 2002

NsJen - If you look in your status bar, the link is down there and the title attribute only tells you additional information about the link.

I use it a lot when I'm building applications where I have to truncate a string of text. If it's a link, I'll put the untruncated text in the title attribute.
posted by SpecialK at 7:26 AM on March 28, 2002

SpecialK, I'm using Opera 6. The only thing that shows up in the status bar, when the title attribute is used, is the title attribute text.

I'm not denying anyone's right to use the title attribute, just mentioning that it's a minor nuisance in some browsers. If it's just Opera that treats it that way, hopefully it's a bug and will be changed in a future release. *trotting off to test it in other browsers and possibly kick out an email to Opera*
posted by NsJen at 7:35 AM on March 28, 2002

Can screw things up for visually-impaired people using JAWS, too, unless you phrase the title carefully (as I just did). Jaws substitutes the text of the link with the text of the title tag, so [this example of linking with a title] would be read aloud as [this example of here's a random title just for the hell of it with a title]. Something to keep in mind if you're building government websites where full accessibility is increasingly mandated. It's a pain, though, because the title attribute is a handy substitute for footnoting.
posted by rory at 7:45 AM on March 28, 2002

Um, I meant title attribute. That first time. Hey, nobody cares about the title tag anyway, do they? (Evidence here.)
posted by rory at 7:52 AM on March 28, 2002

I do believe that's what we in the link-hunting trade call serendipity. The Untitled Document looks quite amusing.
posted by rory at 7:57 AM on March 28, 2002

I also dislike the current trend in overuse of the anchor tag title attribute, simply because it disappears after a few seconds. Anything other than very short comments are unreadable.

The title attribute's close relation, the alt attribute on image tags, serves a useful purpose, the description of an image for browsers tha aren't displaying graphics. But somehow the usefulness of title= seems to have escaped me. If something is worth committing to text, why not just go right ahead and put it in good old-fashioned, permanently on display, text, where it can be read without needing a mouse event?
posted by normy at 8:02 AM on March 28, 2002

Because sometimes you want to make an aside or a footnote. Trying to fit those into the main text can lead to contortionate reworkings of previously simple sentences with unnecessarily elaborate adverbs, and over-reliance on comma'd-off clauses (and parenthetical asides).
posted by rory at 8:16 AM on March 28, 2002

normy, i think title tags are a nice way to summarize a link. however, the behavior of browsers (which is often to cause that summary to disappear quickly) should not be held against the utility of the attribute; it's nothing the author has control over.
posted by moz at 8:19 AM on March 28, 2002

You don't just use it in links, you can even use title attributes for acronyms and abbreviations, examples: MeFi or CSS. Provided your browser understands ABBR & ACRONYM tags.
posted by riffola at 8:20 AM on March 28, 2002

I picked bad examples above.

Acronym - BEST, abbreviation - Prod.
posted by riffola at 8:25 AM on March 28, 2002

Just an observation: Opera understands both ABBR and ACRONYM tags. IE 5.5 doesn't seem to recognize ABBR.

Devil's advocate: Because neither tag gives a visual cue to the user, ("look, mouse over me, there's more information here"), I have to question the usefulness of either tag.
posted by NsJen at 8:27 AM on March 28, 2002

simply because it disappears after a few seconds

I'm on IE 5.5 as well (W2K), and the title tag stays until the mouse moves. The trick is holding the mouse absolutely still until you're done. Taking your hand off the mouse usually jostles it enough to make the title disappear too, so it is difficult.
posted by yerfatma at 8:46 AM on March 28, 2002

From W3C:
The ABBR and ACRONYM elements allow authors to clearly indicate occurrences of abbreviations and acronyms. Western languages make extensive use of acronyms such as "GmbH", "NATO", and "F.B.I.", as well as abbreviations like "M.", "Inc.", "et al.", "etc.". Both Chinese and Japanese use analogous abbreviation mechanisms, wherein a long name is referred to subsequently with a subset of the Han characters from the original occurrence. Marking up these constructs provides useful information to user agents and tools such as spell checkers, speech synthesizers, translation systems and search-engine indexers.

The content of the ABBR and ACRONYM elements specifies the abbreviated expression itself, as it would normally appear in running text. The title attribute of these elements may be used to provide the full or expanded form of the expression.
posted by riffola at 8:50 AM on March 28, 2002

in mozilla, both abbr and acronym are highlighted by a dotted underline, which is a good enough visual cue for me. jen, i think the problem is that you can't judge a tag on how browsers interpret their behavior; you can only judge a tag based on its intention. both the abbr and acronym tags purport to give you some additional info about a thing, which sounds good.
posted by moz at 8:51 AM on March 28, 2002

Whatever happened to see a word, click on it, get information?
posted by gleuschk at 9:21 AM on March 28, 2002

You kids and your fancy new applications. By God, back in the day we had to...*falls back to sleep*
posted by Mack Twain at 9:31 AM on March 28, 2002

I forget which browser did it, but one of them wouldn't put breaks in the middle of title/acronym tags, so if it was an especially long entry, the thing would stretch across the screen, and sometimes even off it, obscuring the end of the entry. Maybe it was Netscape that did it? And an older version at that... so maybe it's moot.
posted by crunchland at 9:41 AM on March 28, 2002

Yes Crunchland - all NS browsers (even 6.x) take long title tags and stretch them (no linebreaks allowed). All you see is the text in the middle of a long title tag.
posted by kokogiak at 10:05 AM on March 28, 2002

NsJen - "I'm using Opera 6. The only thing that shows up in the status bar, when the title attribute is used, is the title attribute text."

Well then if you don't care for it, set your preferences not to display the title text. Go to File > Preferences > Accessibility, and under Tooltips, uncheck 'Show tooltip for element title'. Very simple.

NsJen - Devil's advocate: Because neither tag gives a visual cue to the user, ("look, mouse over me, there's more information here"), I have to question the usefulness of either tag.

Actually NS6 and Moz style them (acronym and abbr) by default. And though some designers choose not to style this element, I certainly don't question it's usefulness in marking up, and imparting information to the user. You on the other hand, seem to be questioning everything based on what seems to be a very narrow field of vision.
posted by mikhail at 10:33 AM on March 28, 2002

The alt attribute and the title attribute are complementary and do different things. The alt attribute is what's displayed if the image doesn't load; this is different than the title attribute, which tells you what will happen if you click on the image (assuming it's a link). For example, for the MetaFilter logo, I'd do this: alt="MetaFilter logo" title="MetaFilter home page". Before most browsers added support for the alt attribute, some web developers misused the title attribute to get the "tool tip" effect.

A List Apart has some nice tips for using CSS to apply styles to abbreviations and acronyms. (Near the bottom, but the whole article has good CSS tips.)
posted by kirkaracha at 11:04 AM on March 28, 2002

NsJen: The ABBR and ACRONYM tags are relatively recent. Yes, most browsers don't style them by default, but I think they're sort of not supposed to. Remember that HTML isn't actually a visual description language. The tags just describe the purpose of their content. Their function is more semantic than visual. It's up to the designer to decide whether s/he wants them to be obvious in a visual sense.
posted by Su at 12:20 PM on March 28, 2002

You on the other hand, seem to be questioning everything based on what seems to be a very narrow field of vision.

You gotta love metatalk... where else does wondering aloud about the utility of an HTML tag, of all things, result in such posturing?
posted by normy at 1:36 PM on March 28, 2002

You call that posturing? Coming from NsJen's other half I'll take it as a compliment.

So if she's right she's openly debating, but if the possibility exists that she may be wrong, she's just wondering aloud. Good call.

Btw, I love how you came to her rescue. You're her knight in shining armour aren't you?
posted by mikhail at 2:53 PM on March 28, 2002

Bah. Ugly. Another way to addendumb primary content. Stupid little pop-up afterthought affectations. Litter. Fortune cookie shreds. Caret carrots. Crib notes.

Now, if you'll excuse me, I've got to write/insert a bunch of them...

(Normy and rory are both right - I just think normy is righter.)
posted by Opus Dark at 8:12 PM on March 28, 2002

normy--6 seconds, IE 5.1/Mac OS X.
posted by rodii at 8:17 PM on March 28, 2002

the title tag stays until the mouse moves

Oddly enough, on older versions of IE (I'm still on 5.0) it seems that as long as you jiggle the cursor on top of the link, the title stays visible. It goes away if the cursor slips off the link, though, so the exercise is a lot like playing "cursor love bunny".
posted by yhbc at 8:46 PM on March 28, 2002

« Older Why is my site not turning up in google?   |   Just wondering why this post was killed. Newer »

You are not logged in, either login or create an account to post comments