U of S | DCS | Courses | CAI | CSS | External Link

[Back] [Contents] [Next]


Linking to External Stylesheets


To link to an external stylesheet you must use the <link> tag in the <head> section of your HTML document.

For example, here's a link to the "main.css" file in the same directory as the document. You can also provide a full url to the .css file to point to style sheets on other web servers. The only part you would change is the "main.css".

<html>
<head>
<title>Document Title Here</title>

<link REL="STYLESHEET"
      HREF="main.css"
      TYPE="text/css">

</head>
<body>
Document Body Here
</body>
</html>

Please send comments about this course to Kevin.Lowey@Usask.CA