Title text Property
Example
Return the text of the document's title:
var x = document.getElementsByTagName("TITLE")[0].text;
Try it Yourself »
Definition and Usage
The text property sets or returns the text of the document's title.
Browser Support
Property | |||||
---|---|---|---|---|---|
text | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the text property:
titleObject.text
Set the text property:
titleObject.text = text
Property Values
Value | Description |
---|---|
text | Specifies the text of the document's title |
Technical Details
Return Value: | A String, representing the text of the document's title |
---|
More Examples
Example
Change the text of the document's title:
document.getElementsByTagName("TITLE")[0].text = "A new title text..";
Try it Yourself »
❮ Title Object