Featured

CSS Syntax

A CSS rule set consists of a Selector and Declaration Block.


A CSS selector always points to the HTML element.
The declaration block contains one or set of declarations.
Each declaration includes a property name and a value to that property, separated by a colon.
Different declarations are separated by semi colons.
e.g.,

p {
     color: red;
     text-align: center;
     }

It's the only matter of style, the above mentioned code can be written as follows too: 

p {
     font-family: 'Arial';
     color: red;
     }

Both will work as same. 


CSS Comments:

               Comments, in any programming language, are used to understand the code. Like other languages, comments are being used in CSS too. 
               Each CSS comment line starts with /* and ends with */.
               /* and */ can also contain muli line comments.
e.g.,

p {
     color: red;
      /* this is a single line commnet */
     text-align: center;
       /* this is a
       multi-line comment */
     }

You can download the example file here: 
author

Muhammad Arslan Aslam

I am a Full Time Student and occasional blogger. Software Engineering student with wide experience and interest in Front-End Web Development. You can find me on my profiles listed below and can get in touch any time.

Get Free Email Updates to your Inbox!

Post a Comment

Suggestions will be greeted.

www.CodeNirvana.in

Copyright © CSS3 (Web Designing) | Designed By Code Nirvana