HTML Webpage Authoring Tricks
6 August 2005 (Updated 12/17/07)
How To Redirect a Web Site to Different URL
Javascript allows a web author to redirect a webpage URL to a new URL. For instance, if you would like all visitors to the website http://www.easygardeningwithmarie.com to be redirected to http://www.a2dvoices.com/gardening, the web author adds the following code anywhere inside the header (HEAD) section of the redirected HTML file:
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers<br>
if (location.hostname == "www.easygardeningwithmarie.com")
{
location.href = "http://www.a2dvoices.com/gardening/";
}
//-- Stop hiding script -->
</SCRIPT>
How To Embed Audio In a Webpage
Audio can be added to any webpage. The audio playback can be initiated manually or automatically. An automatic webpage greeting can be inserted using the <embed> function: