Your Virtual Knowledge Campus

Introduction of CSS and CSS Syntax

c1CSS is a most important style sheets in web programming.

CSS stands for Cascading Style Sheets.Used in web designing to do control the style and layout of multiple Web pages all at a time.

Dear, learner in this tutorial you can learn css ,how to declare it,how to use it & also can know how to use an external css and internal css.

Before learning CSS you should have a knowledge about HTML.

Dear learner if you feel that you have to learn HTML then you can see

our Home Page for learning HTML.

What is  CSS ?:

1.CSS: Which means (Cascading Style sheets).

2.CSS:That is used to control the style and multiple layout of a web page.

3.CSS:That can be used as an internal & external cascading style sheets.

4.CSS: which define how to display HTML elements on a web page.

CSS Syntax:

In css rule there are  two main part: one is selector and other is one or more declarations.

For Example:


How to use CSS ?:

Mainly CSS is used to design  Paragraph, Heading, body, font size etc.

For Example:

P{ color:blackfont-size:14px;  text-align:center;  }


you can also write looks like below.







Note: All CSS declarations ends with a semicolon(;) and block of declarations ends with two curly brackets.

How to declare  CSS  Externally?:

For example:

For Body Styling:



background-color: gray;


For Paragraph styling:



font-family:”Geneva, Arial, Helvetica, sans-serif”;





For Heading Styling:





font-family:”Times New Roman”;



How to declare Internal  CSS ? :

We can also declare css internally.

For Example:


<– For External style.css  file connection -!>
<link a href=”style.css” rel=”stylesheet” type=”text/css” />

      <style type=”text/css”>                        /*>>Internal css start Here*/

 body              {                                       /*>>css id for  web page body*/
background-color :green;
                       padding : 2px;
                       margin : 2px;

#main_wrapper                                       /*>>css id for css wrapper*/

                       width : 920px;
                       margin : 0 auto;
                       border : 2px solid red;
                       padding : 3px;

</style>                                        /* >End of the Internal CSS*/



<body>                                     /*>main body start here*/

<div id=”main_wrapper“>   /*Internal CSS id main_wrapper call here*/
<p>This is some holder text for now</p>



Related Post or  you may fell interest: © 2017