Jump to content

Recommended Posts

Posted

I was perusing the HTML of a web template (By xyz.), when I noticed the attribute title="xyz".

 

It had a class as well as being within an a href statement. This is a new one to me.

 

What does it do? :/

 

Alfie

Posted

Title gives the toolbar popup showing the link it is going to. Basically a waste of code, the title attribute is there to extend the links text, to add text that say there was no room for to better explain it. It is sort of like the alt attribute for images, only it is for text.

Posted

"Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context. For example, setting the attribute on a link allows user agents (visual and non-visual) to tell users about the nature of the linked resource"

 

http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.3

Posted

That said it is worth noting that the majority of blind users actually disable the title attribute. Either way the title attribute should be original and not a copy of the text.

 

It is also used for abbreviations:

DOT

 

Mixed with the "?" (help) icon using CSS to indicate there is something there, it can be used to offer the meaning of a term. very usefull with foreign languages.

 

Blz

Posted

The title attribute can also be useful for SEO purposes, and for describing content pulled in by a element:

 


Reference manual -- Page 5
     type="text/html"
     href="http://someplace.com/manual/start.html">

 

It's the swiss army knife of HTML, does a little bit of everything, depending on the context. ;)

Posted

Also! I love the way "something/someone" in here automatically changed my source reference in my original post to "XYZ". That is an awesome anti-spam gimic!

 

Cudos!

 

Alfie

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...