js add title to element code example Example: javascript change title // Changing the website's <title> document.title = "Test";