If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Syntax
The concept of CSS Syntax is made of three parts :
a) selector
b) property
c) value

Selector = HTML element/tag that you wish to define. Property = the attribute that you wish to change. Each property can take a value. The last two are separated by a colon, surrounded by curly braces :
Though, when the value is multiple words, add a quote around the value
When you want to specify more than one property, separate each property with a semicolon.
To be more reliable, you can describe one property on each line :
Grouping
Each selector can separate with comma. Bellow we have grouped all the headers elements.
Class Selector
Class selectors can define different styles for the same type of HTML element. Here is an example when you have two paragraphs (right-aligned and center-aligned) :
The class attribute in your HTML document :
M ore than one class per given element :
If you omit the tag name in the selector to define a style that will be used by all HTML elements that have a certain class.
id Selector
The id selector is defined as a #.
CSS Comments
Are used to explain your code, and may help you when you edit the source code at a later date.











