1-866-363-5633
www. Expression - Web - Tutorial .com


Expression Web Tutorials:  Building Web Sites with CSS & HTML  ~  One Step at a Time


CSS - Anatomy of a Style Declaration

At the heart of CSS is the Style Declaration

 anatomy of a CSS Style Declaration

  

 

 

 

 

 

A Style Declaration consists of:

1.  Selector:  the selector is used to 'select' the HTML element that you want to style.

2.  Declaration Block:  is everything between the curly brackets.

 

The Declaration Block is further broken down into:

1.  CSS Property 

2.  Value

 

For instance, the Style Declaration (Style) in the image above means all paragraphs will have a font-size of 14px.

The letter 'p' is a Tag or Element Selector.  This type of Selector simply selects an HTML tag by indicating the letters of the HTML tag. 

For instance, the paragraph tag is written as such - <p>

Therefore, we just use the letter 'p' to select 'paragraphs'.

 

CSS Selectors    next