[lesson 1] Introduction to CSS

Discussion in 'CSS' started by algerian, Apr 30, 2009.

  1. #1
    What is CSS
    The CSS (Cascading Style Sheets) is used to define the future aspect of your site, such as the background color of the page or the font type.

    More specifically, the CSS (or stylesheet) is a small file (eg "style.css") in which you will define the future aspect of your site.

    Why use CSS?
    Advantages:
    1. The structure and presentation are managed separately
    2. The design without worrying about the presentation,
    3. HTML code is reduced in size and complexity.

    Example concert?
    I wish the bottom of my pages in gray.
    If I have a 5 page site, I will repeat 5 times:

    In simple HTML:
    <body bgcolor="#CCCCCC">
    Code (markup):
    In CSS I put in my CSS file (eg :style.css)
    body { background-color: #CCCCCC; }
    Code (markup):
    to be continued
     
    algerian, Apr 30, 2009 IP