Advantages of an external style sheet is that as your site grows, you can
make simple style changes in your style sheet and change the elements of all
your pages. at once. It allows for uniformity of each page so that the user
will always know they are on the same site. It hides some codes that make
your html work including positioning, backgrounds, font colors and styles,
and more.
To work with external style sheets you will need an HTML document to work
in and a Cascading Style sheet.
1. Open your HTML document and set it in a view in your editor that you
can see the source. In the head of your document place the following tag:
<link rel="stylesheet" type="text/css" href="stylesheet.css">
Example:
<html>
<head>
<title>My HTML Document</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
</body>
</html>
2. Save your html and CSS and upload both to your web server. The
reference for your CSS in your HTML is the relative or full URL link to
it, so be sure they are placed in the correct locations. The above example
indicated your CSS is in the same folder as the HTML doc.
Go to part 2. |