how to write script that updates the page title in the browser window W3Schools code example Example: change the title in html using document.title = "My New Page Title";