Saturday, January 11, 2014

Learn CSS (Cascading Style Sheet)


What is CSS?
CSS stands for Cascading Style Sheet.Cascading style sheet is used for styling the HTML Tags or Element.
HTML 4.0 provide facility to work with CSS.
There are three ways to add CSS in HTML

  • Inline Cascading Style Sheet
  • Internal Cascading Style Sheet
  • External Cascading Style Sheet


Inline Cascading Style Sheet is most power full and it's written in the HTML tag e.g <p style='color="red"'></p>.It mean in paragraph font color is red.

Internal Cascading Style Sheet is written on the head tag of the HTML page.It is less powerful then inline and More power full then External Cascading Style Sheet.e.g
<Head>
 <style>
p { color: red;}
                                         /* Comment in CSS */
</style>
</Head> 
It also mean color of paragraph in HTML  code is Red.

External Cascading Style Sheet is used externally by making a separate file with .css extension. we can add this file into the head tag of the HTML page.e.g.
<Head>
  <link rel="stylesheet" type="text/css" href="compinfotechnology.css">
</Head>

No comments:

Post a Comment