HTML DOM TitleObject
Title Object
The Title object represents an HTML <title> element.
Access the Title Object
You can use getElementsByTagName() to access the <title> element:
var x = document.getElementsByTagName("TITLE")[0];
Try it Yourself
Create a Title Object
You can use the document.createElement() function to create a <title> element:
var x = document.createElement("TITLE");
Try it Yourself
Title Object Properties
| Property | Description |
|---|---|
| text | Sets or returns the text content of the title element of a document. |
Standard Properties and Events
The Title object supports standardPropertiesandEvents。
Related Articles
HTML Tutorial:HTML Head
HTML Reference Manual:HTML <title> Tag
Other Extensions