What is CSS or Cascading Style sheet?

CSS is a web styling language was proposed in 1994 to solve some html4 problems. At that time there were some other styling language also there like style sheet for html and JSSS but at the end CSS won in all.W3C made it recommended to use css2 in 1998.

Like we fill colour in a sketch to make it more beautiful like this, css is used to make html design architecture more unique, colourful and beautiful. It is used for describing the look and formatting of a document written in a markup language. It is most often used to style web pages and interfaces written in HTML and XHTML. CSS supported by all browsers.

CSS covers fonts, colours, margins, lines, height, width, background images, positions, paddings, display etc .

Selector – Identify the html elements where the css will be applied. For example, body or any div with specific class attributes.

Property and value: Property is the style attribute that developer want to change and every property has its value. Properties are separated by semicolon from each other.

Declaration – Each CSS line that include property and its value is called declaration.

Curly braces – curly braces contains the property and value of a selector and this is called as declaration block.

selector

Selectors – CSS allow us to choose class and id as selectors.

ID selector is unique and same name id selector cannot be used. It represented as #.

Eg – #para1

{

text-align:center;

color:red;

}

 

Class selector with same name can be used several time in a html document. It defined with a ‘.’ .

Eg –

.center {text-align:center;}

More CSS Properties

Leave a Reply