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

01 03 06 02 03a 04 05 7 8 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Click to see the code!
To insert emoticon you must added at least one space before the code.