MDN self-hosted library · e01.org

Document: title property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
document.title = newTitle;
html
<head>
  <meta charset="UTF-8" />
  <title>Hello World!</title>
</head>
js
console.log(document.title); // "Hello World!"
document.title = "Goodbye World!"; // Page title changed
console.log(document.title); // "Goodbye World!"