Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

cascading style sheet syntax - css example - stylesheet
 

cascading stylesheets syntax

stylesheets work by controlling the value(s) of the property(s) of a selector

css example of syntax
selector {property: value;}

almost any html tag can be used as a selector
in the example below the <TT> tag is our selector, the property is color and the value is red

TT {color: red;}

<TT>This is typwriter text with style</TT>

for clarity stylesheets are usually written out like this...

TT {
    COLOR: red;
    FONT-FAMILY: arial;
}
H1 {
    COLOR: red;
    FONT-FAMILY: tahoma, arial;
}
in the stylesheet example above the value of the H1 font-family property is set to 'tahoma' with 'arial' as the back-up font. If 'tahoma' is unavailable on the users computer then the selector ( H1 ) will have arial as it's default font

home
home

next: applying stylesheets

html tutorial css tutorial javascript webmaster articles

css tutorial