Change Tab Text and Window Title On The Fly Tutorial

Published :
Author :
Adam Khoury
Learn to change the tab text and page title in the browser software on the client side after the page has loaded. Set your default page title like normal in the title element, then when certain user interaction or processes occur use JavaScript to change that text to say what you wish. <!DOCTYPE html> <html> <head> <title>&#9654; Multimedia Page</title> <script> function tabText(text){ document.title = text; } </script> </head> <body> <button onclick="tabText('&#9654; Multimedia Page')">Play</button> <button onclick="tabText('Multimedia Page')">Pause</button> </body> </html>