Sunday, December 2, 2007

Scribe Post: External CSS

A CSS modifies existing tags to do things that aren't regularly done when using that tag. For example, you may set the body tag to have the font color green. All text inside the body tags will now have green text. This saves the time needed to place individual tags.

External CSS are linked to instead of being in that specific page, allowing changes across multiple pages by modifying a single area.

An external CSS is similar to a regular CSS except you save it as a separate .css file outside of the index page. An example:

b {font-family=arial; color=red}


(let's say we saved it as ssheet.css)

You then link to it from every web page you want to be affected by it. Place the following code inside the head tags:

link rel="stylesheet" type="text/css" href="ssheet.css"


Now whenever you use the "b" tag in that webpage it will be in arial and in red.

A straightforward example can be found here:
http://www.ibdjohn.com/

No comments: