Categories
JavaScript Answers

How to change the page title with JavaScript?

Spread the love

Sometimes, we want to change the page title with JavaScript.

In this article, we’ll look at how to change the page title with JavaScript.

How to change the page title with JavaScript?

To change the page title with JavaScript, we can set the document.title property.

For instance, we write:

document.title = 'New Title';

to set the page title to ‘New Title’.

Conclusion

To change the page title with JavaScript, we can set the document.title property.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.