change document title html code example
Example 1: change the title in html using
document.title = "My New Page Title";
Example 2: change html title
<title>This is the title</title>
document.title = "My New Page Title";
<title>This is the title</title>