Three Ways to Insert CSS
There are 3 ways of inserting a mode sheet for CSS :- External sheet
- Internal sheet
- Inline vogue
External sheet
An external sheet is good once the fashion is applied to several pages. With AN external sheet, you'll modification the planning of a complete computing device by ever-changing only one file.Each CSS files page should embody a link to the fashion sheet with the <link> tag. The <link> tag goes within the top section:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
Internal sheet
An internal sheet ought to be used once one document encompasses a distinctive vogue. You outline internal designs within the head section of AN HTML pages, within the tag, like this:<head>
<style>
hr {color: sienna;}
p {margin-left: 20px;}
body {background-image: url("images/background.gif");}
</style>
</head>
Inline Styles
An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!To use inline styles, add the style attribute to the relevant tag. The style attribute can contain any CSS3 properties. The CSS Example shows how to change the color and the left margin of a paragraph:
<p style="color:sienna;margin-left:20px;">This is a paragraph.</p>

No comments:
Post a Comment