6. CSS Applied Externally

CSS can be applied to multiple documents via an externalized style sheet. An externalized style sheet is defined in the head section of an XHTML document using the link element. Externalized style sheets can offer cache advantages at the expense of an HTTP request.

Example 6.1 Applied Externally Using Link Element:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Externalized</title>
    <link rel="stylesheet" type="text/css" href="sample.css" />
</head>
    <body>...</body>
</html>	
    
Example 6.2 Externalized Style Sheet Source:
Selector {
    Property:Value;
}