Tap for Menu

Linking CSS

CSS must be linked to a HTML document, or written directly in it. There are a number of ways to do this; both are listed below.

The first method involves writing the CSS between two [style] tags. This works, but it is not recommended. If you want to use this code across mutiple documents, you would have to copy and paste it many times. Plus, if you change it in one spot you have to manually change it in others.

Using external CSS files is an easier, and better way to do things. To do this I would simply take the CSS code that would be in the style tags and place it in a new blank document. That is then named with a ".css" extension. It must be named with a ".css" extension.

After that we can link that document so our HTML browser loads it when the page is laoded. See the proper method above.