External Stylesheets

External style sheets enable the same styles to be reused across multiple web pages

<html>
  <head>
    <link rel=stylesheet href="/styles/screen.css" type"text/css" media="screen">
    ...
    <link rel=stylesheet href="/styles/print.css" type"text/css" media="print">
  </head>
  <body>
     <div class="one">
     ...
     </div >    
  </body>
</html>

The external style sheet can contain style rules and one or more references to other stylesheets via the import keyword.

@import url(/styles/morestyles.css);
.one,.two
{
font-family: "comic sans ms"
color: blue;
property..: value;
}
.two
{
text-decoration: underline
}

Alternately, you can place a sequence of import directives directly between the <style>..</style> tags in the head section of the HTML document. Note the use of the selector grouping:.one,.two.

Jump To...

Colophon