Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM title property

HTML DOM title property

Element Object Reference Element object


Definition and Usage

The title property sets or returns the title of an element.

Syntax

HTMLElementObject.title=

title


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the title property


Example

Example 1

Return the title property of the body element:

Output result:

Body title: mytitle

An alternate way: mytitle

Try it »

Example 2

Return the title of the area map in an image:

width="145" height="126"

alt="Planets"

usemap ="#planetmap">

coords ="124,58,8"

title="Venus"

href ="venus.htm">

Venus' advisory title (mouse over the Venus planet):

Try it »


Element Object Reference Element object