add a title to html code example
Example 1: title tag html
<title>Title to appear in the browsers tab of the page</title>
Example 2: html title
<head>
<title>My page title</title>
</head>
<script>
document.title = "My new title";
</script>
<title>Title to appear in the browsers tab of the page</title>
<head>
<title>My page title</title>
</head>
<script>
document.title = "My new title";
</script>