If you wish to simply set a default background color and font style for your web pages, create a css file like this:
body { background-color: #000000; font-size: 14pt; color: #00FF00; font-family: monospace ; } td { background-color: #000000; font-size: 14pt; color: #00FF00; font-family: monospace ; } pre { background-color: #000000; font-size: 10pt; color: #00FF00; font-family: monospace ; } a:link { background-color: #000000; font-size: 14pt; color: #0000FF; font-family: monospace ; } a:active { background-color: #000000; font-size: 14pt; color: #FFFFFF; font-family: monospace ; } a:visited { background-color: #000000; font-size: 14pt; color: #FF0000; font-family: monospace ; } a:hover { background-color: #000000; font-size: 14pt; color: #FFFFFF; font-family: monospace ; } |
This example CSS file uses large monospace for the body and table text with a black background, and smaller monospace text for text marked with the pre tag. It also sets the link colors, including mouseover (hover). Just stick a line like this between the head tags in your HTML document:
<link REL="StyleSheet" HREF="style.css" TYPE="text/css"> |
To see what this looks like, see NoNIC.org. The cool thing about using CSS is that you don’t have to change your pages to change the properties, just change the one style sheet. For more on cascading style sheets, see this document. To test your CSS file, check out the CSS Validation Service.