Use Structural Markup

You should describe the structure of your document, rather than the appearance. Use HTML tags to indicate the function of each part, not how it should look.


Style Sheets

If you want to suggest how your document should look, you can use Style Sheets to tell the browsers how you would like things displayed.

For example, the style sheet for this talk specifies the margins and the look of the navigation bar, among other things. The following section is specified as <DIV CLASS=code>. The style sheet requests that any element with the class CODE be rendered like this:

.CODE {
	background: #FFFFDD ;
	color: #000000;
	border-width: 3pt ;
	border-color: #FFFFDD;
	border-style: ridge;
	margin-top: 1em;
	margin-bottom: 1em;
	padding: 0em 1em;
}

Style sheets are probably worthy of an entire hour's talk. Unfortunately they are very poorly implemented in current browsers. (MSIE 4.0 is better than NN 4.0, but both really stink.)


Document author: Kevin R. Boyce (email: Kevin.R.Boyce@gsfc.nasa.gov)
This page was last modified on 5-Jan-98 at 5:27 PM