Searching...
Friday 28 September 2012

CSS - Types Of Css

11:14 pm

CSS - Types Of Css

CSS

There are three ways of inserting a style sheet.

1.       Inlinestyles :
                         Where all the styles are defined in the HTML opening tag with “style” attributes.
Eg:
<p style=”color:cyan; margin-left:20px”> this is a paragraph</p>

2.       Internalstyle sheets:
                                           Where all the styles are defined in the current html document inside <style>.

<head>
  <style type=”text/css”>
    Hr
{
   Color : cyan;
  P
{
 Margin-left : 20px;
}
Body
{
  Background-image : url(“image path”);
}
</style>
</head>


Where all the styles are defined in a separate file with the extension of .css  and that can be integrated in the current html document using <link>.
<head>
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”/>
</head>

0 comments:

Post a Comment