title attribute to provide context-sensitive helpHTML
The objective of this technique is to provide context sensitive help for users as they enter data in forms by providing the help information in a title attribute. The help may include format information or examples of input.
Current user agents and assistive technologies do not always provide the information contained in the title attribute to users. Avoid using this technique in isolation.
A mapping application provides a form consisting of a label "Address:", an input component and a submit button with value "Find map". The input component has a title attribute value with an example of the address format the user should enter.
<label for="search-address">Address:</label>
<input id="search-address" name="search-address" size="30"
title="Address example: 101 Collins St, Melbourne, Australia" type="text" value="">
A form that allows users to pay their bill online requires the user to enter their account number. The input component associated with the "Account number" label has a title attribute providing information on locating the account number.
<label for="acc-num1">Account number:</label>
<input id="acc-num1" size="10"
title="Your account number can be found in the top right-hand corner of your bill"
type="text" value="">
title attribute.