document.title = newTitle;Document: title property / notebook
Document: title property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<head>
<meta charset="UTF-8" />
<title>Hello World!</title>
</head>console.log(document.title); // "Hello World!"
document.title = "Goodbye World!"; // Page title changed
console.log(document.title); // "Goodbye World!"