CSS Syntax
Basic syntax as follows:
selector { property: value }
That is a property (such as color) followed by a colon (:) and a value.
A property is assigned to a selector in order to manipulate its style.
Examples of properties include color, margin, and font. The value is an
assignment that a property receives. Multiple style declarations for a
single selector may be separated by a semicolon. The following example
defines the color and font-size properties for H1 and P elements:
<HEAD>
<TITLE>CSS Example</TITLE>
<STYLE TYPE="text/css">
H1 { font-size: x-large; color: darkred }
P { font-size: 12pt; color: darkblue }
</STYLE>
</HEAD>
You can use grouping of selectors and declarations to decrease repetitious
statements within style sheets. For example:
H1, H2, H3, H4 { color: #666666; font-family: Arial }
|