CSS

adplus-dvertising
Introduction of CSS
Previous Home Next

CSS(Cascading Style Sheets) is a language that is used in describe the presentation semantics like, the look and formatting of a document written in a markup language that is known as style sheet.

Syntax of CSS-

In Style sheet a list of rules are made. It is consists of one or more selectors and a declaration block. A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a property, a colon(:),a value.If there are multiple declarations in a block,a semi-colon (;) must be inserted to separate each declaration.

selector [, selector2, ...][:pseudo-class]
{
property: value;
[property2: value2;
...]
}

Suppose we want to make highlight the heading-

h1 { color: white; background-color: orange !important; }
Advantages of CSS-
  • Page reformatting
  • Separation of content from presentation
  • Flexibility
Previous Home Next