Prop Title Text
# Title text Property
[ Title Object](#)
## Example
Returns the text content of the document's title tag:
var x = document.getElementsByTagName("TITLE").text;
The output of _x_ is:
HTML DOM Objects
[Try it Β»](#)
* * *
## Definition and Usage
The text property is used to set or return the text content of the document's title element.
* * *
## Browser Support

All major browsers support the text property.
* * *
## Syntax
To get the text property:
_titleObject_.text
To set the text property:
_titleObject_.text=_text_
## Property Values
| Value | Description |
| --- | --- |
| _text_ | Describes the text content of the document's title element. |
## Technical Details
| Return Value: | A string representing the text content of the document's title element. |
| --- |
* * *
## More Examples
## Example
Change the text content of the title element in the document:
document.getElementsByTagName("TITLE").text="New Title..";
[Try it Β»](#)
* * Title Object](#)
YouTip