• Archives

  • Simple css coding

    By admin | December 8, 2007

    Html was designed to display information but it does not have any style in the need of style they designed css

    Cascading style sheets

    Which save a lot of coding work

    Syntax

    The syntax is very easy and made up of three parts

    selector {property: value}

    For ex

    body {
    color: red;
    }
    
    

    For using css with html you have to declare class in html for the element you want to do css coding

    <p class="example">
    
    This paragraph can not be changed but style can be:D
    </p>

    In css you will write

    p.exapmle{

    text-align: center;

    }

    This will center the text

    Thanks

    Krates

    Topics: CSS | Comments Off on Simple css coding

    Related Links: