html tutorial - title Attribute in HTML - html5 - html code - html form



Title attribute in html

Learn html - html tutorial - Title attribute in html - html examples - html programs

  • The title attribute describes additional information about an element.
  • The information is most usually displayed as a tooltip text though the mouse moves over the element.
  • The title attribute is a part of the Global Attributes.

Syntax for title attribute in HTML:

<element title="text">

Differences between HTML 4.01 and HTML5 for title attribute:

HTML 4.01

HTML 5

  • In HTML5 the title attribute can be used in any HTML element

Applies To:

Element Attribute
All HTML elements title

Attribute Values:

Value Description
text Provides a tooltip text for an element.

Sample Coding for title Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
   <body>
    <h1> WIKITECHY</h1>
    <p>Everyone have 
    <abbr title="Personal Index Number">PIN
    </abbr>number  for their Bank account</p>
    </body>
</html>

Code Explanation for title Attribute in HTML:

title Attribute Code Explanation

  1. <abbr> tag is given to display the abbreviation of the content “Personal Index Number” (PIN).
  2. title attribute provides additional information about an element

Output for title Attribute in HTML:

title Attribute Tag Output

  1. Personal Index Number is an abbreviation of PIN that has been displayed like tooltip when the cursor moves over to the PIN.

Browser Support for title Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to title Attribute in html