Published August 28, 2021
To change or add a text to the browser tab, we can set the value of the
title property of the global
For example, consider we want to show a text called
Home in the browser tab when the user visits the home page of your website.
So for that, we can use the
document.title property and set its value to the string
It can be done like this,
// Change or add text to the browser tab // using the document.title property document.title = "Home";
Now the browser tab text will be changed to the text
See the above code live in JSBin.
That's all 😃!