Specifying Properties and Values

To indicate to the HTML engine our setting for a property we simply use this syntax:

TAG {property:value}

We'll see an actual example of this in the next paragraph. We can specify additional property values by adding new text and separating them with a semi-colon. We can also set the property values for more than one tag at time; for this purpose we use a comma as a delimiter.

For example, first, set the body text to the Arial font:

BODY {font-family:Arial}

Then set all of the headings to be green:

H1, H2, H3, H4, H5, H6 {color:green}

Finally, define emphasis text as bold 24-point Times:

EM {font-family:Times; font-size:24pt; font-weight:bold}

And that's all there is to setting style sheet properties – we just put whatever property we'd like to set together with the value and associate this combo with a tag.