CSS Definition and Usage

Css can be use as three types :

1: External CSS

2: Internal CSS

3: Inline CSS

Css definition is same in all the CSS format. but we can use them with different way. First we learn with External Css.


External style sheets are separate files full of CSS instructions (with the file extension .css). When any web page includes an external stylesheet, its look and feel will be controlled by this CSS file (unless you decide to override a style using one of these next two types). This is how you change a whole website at once. And that's perfect if you want to keep up with the latest fashion in web pages without rewriting every page!


<link rel="stylesheet" type="text/css" href="mystyle.css">


Internal styles are placed at the top of each web page document before any of the content is listed. This is the next best thing to external because they're easy to find, yet allow you to 'override' an external style sheet -- for that special page that wants to be a nonconformist!



<style type="text/css">

h1 {
margin-left: 20px;

p {
font-family: Arial, Helvetica, Sans Serif;



Inline styles are placed right where you need them, next to the text or graphic you wish to decorate. You can insert inline styles anywhere in the middle of your HTML code, giving you real freedom to specify each web page element. On the other hand, this can make maintaining web pages a real chore!


<h1 style="color:red;margin-left:20px;">Today’s Update</h1>

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *