<html> <head> <title>Untitled</title> <script language="javascript" type="text/javascript"> function changeTitle() { var newTitle = prompt("A title.", "default title"); window.document.title = newTitle; } </script> </head> <body> <P>You can change <a href="javascript:changeTitle()"> the <title> element</a> on this page</p> </body> </html>