How to Include External Style Sheet in HTML Document ?
What is External Style Sheet ?
- All the CSS rules are written in the .css file.
- File with extension .css is called as External Style Sheet.
- We can apply External Style Sheet to Single or Multiple HTML documents.
- After changing single CSS file we can change the look and appearance of number of HTML documents or web pages.
- External CSS can be applied to webpage just by including stylesheet using <link> tag.
- The <link> tag goes inside the Head Section of the Document.
- External Style sheet can be written in any of the Text Editor or CSS Editor.
- 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.