HTML.title (Property)

The document title.


JScript - 3.0
Internet Explorer - 4.0
Property/method value type:String primitive
JavaScript syntax:IEmyHTML.title
HTML syntax:<TITLE>aTitle</TITLE>
Argument list:aTitleA title text

The DOM standard at level 1 requires that the title property of an HTML object should contain the text from the <TITLE> HTML tag in the <HEAD> block of the document. At least, this is the implication, because it refers the reader to the HTML specification, which defines that <TITLE> is only legal inside <HEAD> blocks. We can't really say this is part of the DOM specification, which unfortunately makes it ambiguous.

Netscape makes this available as the document.title property, as does MSIE. However, MSIE does support this property as a member of the HTML object even though it is not mentioned in the Microsoft documentation.

In Netscape, the title property of an HTML object exists but is empty, hence it cannot be guaranteed to be available in Netscape 6.0.

See also:Document.title