This is a test heading

This is a test paragraph. Click the buttons to change the stylesheet(s).







all.css styles the link
Default colours the background and gives default font colours
Pretty changes the fonts and font styles, aligns the buttons and provides a different background
Big font changes all font sizes
High contrast changes all colours to make things easy to see, and overrides the link styles


The script is held in a [Download] JavaScript header file and is able to use a cookie to remember the user's choice of stylesheets. In this case, I have chosen to remember that choice only until the browser is closed.

If you are interested, I have also written [Download] this alternative version, which uses the document.styleSheets collection wherever possible. It is not so efficient as the other version, and I do not recommend its use.


Back to the JavaScript tutorial.

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees