1. Internal style sheet
It is mainly used when a single documents has unique style. It defines in head section of the HTML page, by using the <style> tag.
Example
<head>
<style type="text/css">
hr {color:sienna;}
p {margin-left:20px;}
body {background-image:url("images/back40.gif");}
</style>
</head>
<style type="text/css">
hr {color:sienna;}
p {margin-left:20px;}
body {background-image:url("images/back40.gif");}
</style>
</head>
2. External Style Sheet
It is applied to many pages. You can change the look of the entire web sites. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section. The style sheet must be saved in .css form.
Example
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
3. Inline Style
To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property.
Example
<p style="color:sienna;margin-left:20px">This is a paragraph.</p>
Reference
http://www.w3schools.com/css/css_howto.asp
Reference
http://www.w3schools.com/css/css_howto.asp

Wow...with Example how to use Style sheet...its easy to understand...nothing to search in anywhere...
ReplyDeleteSo many examples helps a lot, thank you for your hard working
ReplyDelete