visitor activity monitorvisitor activity monitor

PROJECT CODE

                                            The Developers Choice!!!!
                                                                                                            Home | About Us | Contact Us

CSS TUTORIALS

How To:

How To Insert CSS
There are three ways of inserting a style sheet:
  • External style sheet
  • Internal style sheet
  • Inline style
What is External Style Sheet
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing just one file. Each page must include a link to the style sheet with the </link> tag. The </link> tag goes inside the head section: </head> </head> An external style sheet can be written in any text editor. The file should not contain any html tags. The style sheet file must be saved with a .css extension.
How to use External Style Sheet
Each page must include a link to the style sheet with the </link> tag. The </link> tag goes inside the head section: </head> </head> An external style sheet can be written in any text editor. The file should not contain any html tags. The style sheet file must be saved with a .css extension.
How to implement External Style Sheet
An example of a style sheet file is shown below:
"main.css":
hr {color: green;}
p {margin-left: 10px;}
body {background-image: url("images/background.jpg");}
What is Internal Style Sheet

An internal style sheet should be used when a single document has a unique style.

How to use Internal Style Sheet

You define internal styles in the head section of an HTML page, inside the </style> tag, like this:
</head>
</style>
hr {color: blue;}
p {margin-left: 20px;}
body {background-image: url("images/background.jpg");}
</style>
</head>

How to implement Internal Style Sheet

Example
<head>
<style>
hr {color: blue;}
p {margin-left: 20px;}
body {background-image: url("images/background.jpg");
}
</style>
</head>

What is Inline Styles

An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!

How to use Inline Styles

To use inline styles, add the style attribute to the relevant tag. The style attribute can contain any CSS property.

How to implement Inline Styles

The example shows how to change the color and the left margin of a paragraph:
</p style="color:blue;margin-left:20px;">This is a paragraph.</p>

All Rights Reserved with Project code