0 0 Votes

JavaScript: Change Page Title

Question by Guest | 08/03/2019 at 17:28

How can I change the title of an HTML page with JavaScript? Is that possible? I would like to customize the existing title (title in the head of the page) after the page has already been loaded. Do I need a special library for that, maybe jQuery?


Stefan Trost

Show Profile | Message
1Best Answer
1 Vote

You can change the page title of an HTML page with a simple one-liner:

document.title = "New Page Title";

You do not need a library like jQuery. It could not be easier.
08/03/2019 at 23:01

ReplyPositive Negative

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.


Ask your own question or write your own articles on askingbox.com. How to do.