the web workshop

The following is the syntax of a style rule for embedded and external styles.
It includes the HTML element as the selector and the declaration (property and value)

The CSS syntax is made up of three parts: a selector, a property and a value

The Syntax:

selector {property: value; property: value;}

Looks like:

h1{color:red; text-align:center; }

h1 is the selector
color and text-align are the properties
color has the value red
text-align has the value center

Can also look like:


It is easier to read in this vertical layout. Like HTML, extra spaces and lines in the code does not effect how the browser interprets the code.


  1. enter the selector you want to define characteristics for, such as h1
  2. use the { bracket to start the rule
  3. use } to end the rule
  4. inside the brackets, list the characteristics you want the tag to use
    1. list the property
    2. use the colon (:) to separate the property from its value
    3. list the value
  5. use a semi-colon (;) to separate each characteristic.

This new rule will effect the presentation of all the content inside any and all h1 tags on your web page(s).

This workshop is brought to you by

Please feel free to contact us with any comments and/or concerns about this workshop