CSS External Style



What is External Style Sheet ?

  1. All the CSS rules are written in the .css file.
  2. File with extension .css is called as External Style Sheet.
  3. We can apply External Style Sheet to Single or Multiple HTML documents.
  4. After changing single CSS file we can change the look and appearance of number of HTML documents or web pages.
  5. External CSS can be applied to webpage just by including stylesheet using <link> tag.
  6. The <link> tag goes inside the Head Section of the Document.
  7. External Style sheet can be written in any of the Text Editor or CSS Editor.
  8. External Style sheet does not contain any HTML tags. It just contain CSS rules.

How do i include External Style Sheet ?

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

Sample Content of External Style Sheet :

html {
 font-size:100.01%;
 min-height:101%;
 background:#2a2a2a url(../images/bgfull.jpg) repeat;
}
body {
 font-size:62.5%;
 font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
}
em {
 font-style:italic;
}

Precaution :

Do not add space between property value and unit.