CSS Basic Syntax
# Syntax
CSS has its own syntax rules. The most Basic CSS syntax consists of a list of parameters. Like follows:
| |
It consits of two key parts:
- Selector. It indicates which HTML elements the styles will be applied to.
- Declaration block. Declaration Block contains one or more declarations separated by semicolons
# Examples
| |
Each declaration block its divided in parts, property name and value, each separated by a colon.
- Property. Determines what exactly will be altered, it can be the background or other content in the page.
- Value. The refinement that will be done based on the property that was already defined.
# Comments
The syntax of CSS comments is like a multi line comment in java:
| |
# Single Line comments
| |
# Multi-line comments
| |
They can let u disable code fragments, to be honest, its like using multi line java comments for everything.