W3C home > Mailing lists > Public > www-html@w3.org > July 1999

Re: alt <=> title

From: Nicolas Lesbats <nlesbats@etu.utc.fr>
Date: Fri, 23 Jul 1999 16:44:58 +0200 (MET DST)
To: Daniel Cassar <illusion@gulf.net.au>
cc: w3c html <www-html@w3.org>
Message-ID: <Pine.OSF.4.02.9907231630340.28030-100000@vega.utc.fr>
On Thu, 22 Jul 1999, Daniel Cassar wrote:

| Could anyone please tell me what the main differance is between the 'alt'
| and the 'title' attribute.

The 'alt' attribute is designed in order to replace a non-textual element,
for instance an image.

The 'title' attribute allows you to give... a title to the element.

An example : http://www.x-files.com/

All text is formatted with images. In the main menu, you have a 'What's
new' item. The code may be :

<img src="new.gif" alt="What's new">

Now, you can add a 'title' attribute, for instance :

<img src="new.gif" alt="What's new" title="Mulder and Scully's
first kiss !">

You can also use the 'title' attribute with a link. For example :

<a href="next.html" title="Article's title">Next article</a>
(recognized by IE5)

With the <acronym> element :

<acronym title="World Wide Web Consortium">W3C</acronym>
(recognized too by IE5)

[Note : in this case, you should use <abbr>, but this element isn't
included in IE5]

And so on...

			Nico

| 
| Is it that 'alt' is compatable with older (text) browsers and 'title' is
| just there to give a pic, link whatever a title?????
| 
| >From what I can gather the 'title' attribute can be used in style sheets....
| 
| Which should I use and when? Do I need to have both of them??
| 

-- 
Nicolas Lesbats - nlesbats@etu.utc.fr
85 r. Carnot 60200 Compiegne - France
 06 86 800 908

Plaider <http://wwwassos.utc.fr/~plaider/>

3:-)
Received on Friday, 23 July 1999 10:45:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:39 GMT