CSS Syntax
Syntax :
A CSS rule has two main parts: a selector, and a number of declarations:
The selector is usually the HTML element you want to style.
Each report includes a property and a value.
The property may be the model feature you want to change. Each property features a value.
Example :
A CSS report generally stops with a semicolon, and report groups are surrounded by ugly supports:
p {color:blue;text-align:center;}
To make the CSS more understandable, you are able to put one report on each range, similar to this:
Example :
p
{
color:blue;
text-align:center;
}
{
color:blue;
text-align:center;
}
Comments :
Remarks are used to explain your signal, and may help you whenever you revise the foundation signal at a later date. Remarks are dismissed by browsers.
A CSS review begins with “/*”, and ends with “*/”, like this:
A CSS review begins with “/*”, and ends with “*/”, like this:
/*This is a comment*/
p
{
text-align:center;
/*This is another comment*/
color:red;
font-family:arial;
}
p
{
text-align:center;
/*This is another comment*/
color:red;
font-family:arial;
}