Importing a CSS File
CSS styles may be imported into a web page from an external file. This is common practice because it allows a style change to be made in one place that may affect the entire web site.
The import is done with the HTML link
tag.
Here is the format.
<link href="[URL]" rel="stylesheet" type="text/css">
Replace [URL]
with the URL of the external CSS styles file.
Put the link
tag somewhere in the HEAD area of the web page source file. The HEAD area is the section that begins with <head>
and ends with </head>
.
Note: The external styles file does not use the <style>
and </style>
tags to mark the beginning and end of styles. Those tags are used only when a CSS style sheet is published directly in the web page source code.
Will Bontrager