1. External CSS
2. Internal CSS and
3. Inline CSS
Example: External CSS
example.css
h2 {font-size: 16pt;}
h3 {color: green;}
p {margin-left: 20px;}
Example: Internal css
Example: Inline css class
Syntax
The CSS syntax is made up of three parts: a selector, a property and a value:
selector {property: value} |
The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value. The property and value are separated by a colon, and surrounded by curly braces:
Example: