Skip to content

How to change the page title with JavaScript?

To change the page title with JavaScript, we can set the document.title property. This can be useful if you want to change the title of the page to the current context of the website/app.

document.title = 'New Title';
See also  How to clone an array in JavaScript?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.