Using link

The best-supported method for referring to external style sheets is to create a link to the CSS document using the link element in the head of the document, as shown in this example:

    <head><link rel="stylesheet" href="/pathname/stylesheet.css" type="text/css" />
    </head>

The rel attribute defines the linked document’s relation to the current document—a “style sheet.” The href attribute provides the URL of the style sheet document. Authors may link to more than one style sheet in a document and both will apply.

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.