Friday, 5 June 2015

External CSS Style Sheet


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

Each HTM page must be include a reference to the external CSS style sheet file inside the <link> element. The <link> element goes inside the <head> section:

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

you can write external style sheet in any text editor. The file should not contain any html tags. The style sheet file must be saved with a .css(style-sheet.css) extension. An example of a style sheet file called "style-sheet.css", is shown below:

body {
    background-color: green;
}

h1 {
    color: red;
    margin: auto;
}

No comments:

Post a Comment