YouTip LogoYouTip

Prop Title Text

# Title text Property [![Image 8: Title Object Reference Manual](#) 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 ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) 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](#)
← Nodejs TutorialDom Obj Title β†’