The title property

The title property holds the value (string) of the title of the HTML document.
The title is set within the title tags in the head section of the document.

<title>Honda Bikes</title>

document.write("<h1>" + document.title + "</h1>");

<p>Honda bikes are among the best in the world.</p>


This is useful when you want to display the title of the document in another place than in the top bar of the window.

Leave a Reply