Title text attributes
Examples
Return to the document title tag text content:
var x = document.getElementsByTagName ( "TITLE") [0] .text;
x The output is:
HTML DOM Objects
try it"
Definitions and use
text property sets or returns the text content of the document title element.
Browser Support
All major browsers support the text attribute.
grammar
Returns text attributes:
titleObject .text
Setting text attributes:
titleObject .text = text
Property Value
value | description |
---|---|
text | It describes the text content of the title element of the document. |
technical details
return value: | String, returns the text content of the document title element. |
---|
More examples
Examples
Modify the document title element in the text:
document.getElementsByTagName ( "TITLE") [0] .text = "new title ..";
try it"