Friday, 5 June 2015

How To CSS Style


How To CSS Style Write or Insert ?

Three Ways to Insert CSS in your HTML file
There are three ways of inserting a style sheet:

1. "External" style sheet
2. "Internal" style sheet
3. "Inline" style

External CSS:
With an external style sheet(file), you can change the look of an entire website by changing just one file!

<head>
<link rel="stylesheet" type="text/css" href="style-sheet.css">
</head>

Internal CSS:
An internal style sheet it may be used if one single page has a unique style or different from other pages.

<head>
<style>
body {
    background-color: green;
}

h1 {
    color: red;
    margin-left: auto;
}
</style>
</head>

Inline CSS:
An inline style it may be used to apply a unique style for a single element in HTML.


<h3 style="color:red; margin-left:40px;">This is a third heading.</h3>

No comments:

Post a Comment