Importing

An alternative to linking is to import an external style sheet into a document using the @import function in the style element:

    <style type="text/css">
    <!--@import url(http://pathname/stylesheet.css);
          p {font-face: Verdana;}
    -->
    </style>

In this example, an absolute URL is provided, but a relative URL may also be used. @import commands must come before anything else (except @charset).

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.