tag in html for making title code example
Example 1: html title
<head>
<title>My page title</title>
</head>
<script>
document.title = "My new title";
</script>
Example 2: change the title in html using
document.title = "My New Page Title";
<head>
<title>My page title</title>
</head>
<script>
document.title = "My new title";
</script>
document.title = "My New Page Title";