Allowing the user to select a style sheet

This script allows the user to select a style from a local file or a remote server, then open the page again using the selected style sheet. Cascading Style Sheets (CSS) files are useful to maintain a consistent look over a site without cluttering up the code with tags for formatting.

Below the form is some sample markup. The scripts here use the the CGI module's convenient HTML shortcut methods. It is a functional notation using the normal HTML tags. For example:

print h1('Allowing the user to select a style sheet');

Style sheet choices -- current pick is: Browser default (no style sheet linked)

Click a radio button to select a new style, then click the SUBMIT button to view this page using the new style.









Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6

This is text inside a paragraph tag.

This is text inside a blockquote tag.

Phrase elements

This is text inside a cite tag.
This is text inside a code tag.
Emphasis.
Strong emphasis.

Font style elements

bold
italic
bold italic
strike through
teletype text
underline