HTML DOM Title Object

Title Object

The Title object represents the HTML <title> element.

Access Title Object

You can access the <title> element using getElementById():

var x = document.getElementById("myTitle");

Try It Yourself

Create Title Object

You can create a <title> element by using the document.createElement() method:

var x = document.createElement("TITLE");

Try It Yourself

Title Object Properties

Properties Description
text Sets or returns the text of the document title.

Standard Properties and Events

Title Object Supports StandardsPropertiesAndEvents.

Related Pages

HTML Reference Manual:HTML <title> Tag