The DocumentTitle property returns the current
title of the document loaded in the browser. This corresponds to the
contents of the <title> element in the document's
<head> section, if one is defined.
The title is not fixed at the time the page is first loaded. A
script running in the document can modify the <title>
element dynamically, and some web applications use this technique
to reflect state changes (for example, to indicate new messages or status
updates). Because of this, the value returned by this function may
change over the lifetime of the page. If the document does not
explicitly define a title, the function may return an empty string.
Applications that display document titles should be prepared to handle
this case.
If the current document does not have a title, this property will
return an
empty string. This is not uncommon if the
DocumentText property is used to change the current
document and the text does not contain HTML markup or does not
include a <title> tag.