• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

An Introduction to CSS

Imagine for a moment that our fictitious Dorknozzle website used the same font face, color, and size consistently throughout the site. Also imagine that the Dorknozzle site consists of three hundred pages and you need to change the font from Arial to Verdana and from a black color to gray throughout the site. You can imagine how frustrating it would be to open every single one of those three hundred files and manually change every place you had applied a font to a section of text. At its foundation, CSS solves this dilemma. With CSS, you can create one file (styles.css) and apply the style rules in that CSS file to dictate how the text in your website should look. If the time ever comes to change the font properties, you do it in that one CSS file, and your changes appear throughout the entire site.

But how does this work? Style sheets are usually contained in an external CSS file (but they don't have to be) and are linked in to every web page you are working with using the <link> tag within the <head> tag of your document. Therefore, any and all styles from that CSS file can be applied to the web pages you are working with, ultimately providing you with the flexibility to quickly and easily modify one CSS file that propagates changes to all the web pages that share the CSS file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint