Site hosted by Angelfire.com: Build your free website today!
Samantha Coaker's HTML Tutorials

Back | Contact

Samantha's HTML Help How to make a back button.

This is a very simple little code, but very useful. It saves people having to use the back button on their browser (which in website competitions, judges hate to have to do), and allows you to have a more dynamic site, because the only other way would be to have a very linear site.

The code, as I said is very simple, it's just your bog-standard hyperlink, but instead of putting a URL or file name in the href attribute put: javascript:history.go(-1)

e.g
<a href="javascript:history.go(-1)">Go Back to the HTML Tutorials Menu</a>


Easy peasy huh? Go Back to the HTML Tutorials Menu

This code can be combined with the image tag like a normal image hyperlink to make it look even better.

Tutorials © Samantha Coaker